Class FilterDefinition

  • All Implemented Interfaces:
    Comparable<FilterDefinition>

    public class FilterDefinition
    extends Object
    implements Comparable<FilterDefinition>
    A filter definition holds the metadata of a filter, a name, a description, if is enabled or not and the class of objects to which it will be applied finally it includes the filter itself. The filter allows to have a custom query(with a Groovy Script), that could be executed by an inventory object in order to obtain more complex results than the API results that are limited to get the direct children or get children of a class recursively e.g. - a filter for the class Router, that gets all the Optical Ports in a Router - a filter for the class Router, that gets all the Physical and Virtual Ports in a Router nut not the ServiceInstace - a filter for class City, that gets all routers and switches with vendor "cisco" in a City A filter is created for a class metadata and applies to its instances
    Author:
    Adrian Martinez Molina <adrian.martinez@kuwaiba.org>
    • Constructor Detail

      • FilterDefinition

        public FilterDefinition​(long id,
                                String name,
                                boolean enabled)
      • FilterDefinition

        public FilterDefinition​(long id,
                                String name,
                                String description,
                                String classToBeApplied,
                                String script,
                                boolean enabled)
    • Method Detail

      • getId

        public long getId()
      • setId

        public void setId​(long id)
      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getDescription

        public String getDescription()
      • setDescription

        public void setDescription​(String description)
      • getClassToBeApplied

        public String getClassToBeApplied()
      • setClassToBeApplied

        public void setClassToBeApplied​(String classToBeApplied)
      • getScript

        public String getScript()
      • setScript

        public void setScript​(String script)
      • isEnabled

        public boolean isEnabled()
      • setEnabled

        public void setEnabled​(boolean enabled)
      • getFilter

        public Filter getFilter()
      • setFilter

        public void setFilter​(Filter filter)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object