Class FilterDefinition
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.persistence.application.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 Summary
Constructors Constructor Description FilterDefinition(long id, String name, boolean enabled)
FilterDefinition(long id, String name, String description, String classToBeApplied, String script, boolean enabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FilterDefinition o)
boolean
equals(Object obj)
String
getClassToBeApplied()
String
getDescription()
Filter
getFilter()
long
getId()
String
getName()
String
getScript()
int
hashCode()
boolean
isEnabled()
void
setClassToBeApplied(String classToBeApplied)
void
setDescription(String description)
void
setEnabled(boolean enabled)
void
setFilter(Filter filter)
void
setId(long id)
void
setName(String name)
void
setScript(String script)
String
toString()
-
-
-
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)
-
compareTo
public int compareTo(FilterDefinition o)
- Specified by:
compareTo
in interfaceComparable<FilterDefinition>
-
-