Package org.xwiki.livedata
Class LiveDataPropertyDescriptor.FilterDescriptor
- java.lang.Object
-
- org.xwiki.livedata.WithParameters
-
- org.xwiki.livedata.BaseDescriptor
-
- org.xwiki.livedata.LiveDataPropertyDescriptor.FilterDescriptor
-
- Enclosing class:
- LiveDataPropertyDescriptor
public static class LiveDataPropertyDescriptor.FilterDescriptor extends BaseDescriptor
Holds the filter configuration.
-
-
Constructor Summary
Constructors Constructor Description FilterDescriptor()
Default constructor.FilterDescriptor(String id)
Creates a new descriptor for the filter with the specified id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LiveDataPropertyDescriptor.OperatorDescriptor
addOperator(String id, String name)
Adds a new supported operator.String
getDefaultOperator()
List<LiveDataPropertyDescriptor.OperatorDescriptor>
getOperators()
void
initialize()
Preventnull
values where it's possible.void
setDefaultOperator(String defaultOperator)
Sets the default operator to use.void
setOperators(List<LiveDataPropertyDescriptor.OperatorDescriptor> operators)
Set the list of operators supported by this filter.-
Methods inherited from class org.xwiki.livedata.BaseDescriptor
equals, getId, hashCode, setId
-
Methods inherited from class org.xwiki.livedata.WithParameters
getParameters, setParameter
-
-
-
-
Constructor Detail
-
FilterDescriptor
public FilterDescriptor()
Default constructor.
-
FilterDescriptor
public FilterDescriptor(String id)
Creates a new descriptor for the filter with the specified id.- Parameters:
id
- the filter id
-
-
Method Detail
-
getOperators
public List<LiveDataPropertyDescriptor.OperatorDescriptor> getOperators()
- Returns:
- the list of operators supported by this filter
-
setOperators
public void setOperators(List<LiveDataPropertyDescriptor.OperatorDescriptor> operators)
Set the list of operators supported by this filter.- Parameters:
operators
- the new list of supported operators
-
addOperator
public LiveDataPropertyDescriptor.OperatorDescriptor addOperator(String id, String name)
Adds a new supported operator.- Parameters:
id
- the operator idname
- the operator pretty name- Returns:
- the added operator
-
getDefaultOperator
public String getDefaultOperator()
- Returns:
- the default operator to use when the user doesn't specify one
-
setDefaultOperator
public void setDefaultOperator(String defaultOperator)
Sets the default operator to use.- Parameters:
defaultOperator
- the new default operator to use
-
initialize
public void initialize()
Preventnull
values where it's possible.
-
-