public class CmsDataViewFilter extends java.lang.Object
A filter has a unique id, a set of options (consisting of a map whose keys are internal identifiers of the options and whose values are the texts to display to the user), a current value and a 'nice name' to display as caption for the filter. Filter options don't by default have a "null" (=neutral, i.e. filter is not applied) option; if you need this, add a corresponding option in your implementation of I_CmsDataView.
| Constructor and Description |
|---|
CmsDataViewFilter(java.lang.String id,
java.lang.String niceName,
java.lang.String helpText,
java.util.LinkedHashMap<java.lang.String,java.lang.String> options,
java.lang.String value)
Creates a new filter.
|
| Modifier and Type | Method and Description |
|---|---|
CmsDataViewFilter |
copy()
Creates a copy of the filter.
|
CmsDataViewFilter |
copyWithValue(java.lang.String value)
Creates a copy of the filter, but uses a different filter value for the copy.
|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getHelpText()
Gets the help text for the filter.
|
java.lang.String |
getId()
Gets the id of the filter.
|
java.lang.String |
getNiceName()
Gets the user-readable name of the filter.
|
java.util.Map<java.lang.String,java.lang.String> |
getOptions()
The map of filter options.
|
java.lang.String |
getValue()
Gets the current value.
|
int |
hashCode() |
public CmsDataViewFilter(java.lang.String id, java.lang.String niceName, java.lang.String helpText, java.util.LinkedHashMap<java.lang.String,java.lang.String> options, java.lang.String value)
id - the filter idniceName - the nice namehelpText - the help text for the filteroptions - the ordered map of optionsvalue - the current valuepublic CmsDataViewFilter copy()
public CmsDataViewFilter copyWithValue(java.lang.String value)
value - the filter value for the copypublic boolean equals(java.lang.Object other)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String getHelpText()
public java.lang.String getId()
public java.lang.String getNiceName()
public java.util.Map<java.lang.String,java.lang.String> getOptions()
Internally, this is stored as a LinkedHashMap, so the order of options is preserved. The keys of the map are internal identifiers for the options, while the values are the texts displayed in the GUI for the options.
public java.lang.String getValue()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()