public abstract class AbstractDefaultSearchCriterionDefinition extends Parameter<MetadataType> implements SearchCriterionDefinition
SearchCriterionDefinition| Modifier and Type | Field and Description |
|---|---|
private Optional<Searchable> |
_searchable |
| Constructor and Description |
|---|
AbstractDefaultSearchCriterionDefinition(String id,
String pluginName,
I18nizableText label,
MetadataType type,
Optional<String> widget,
Optional<Map<String,I18nizableText>> widgetParams,
Optional<Enumerator> enumerator,
Optional<Validator> validator,
Optional<Object> defaultValue,
Optional<Searchable> searchable)
Constructs a
SearchCriterionDefinition |
| Modifier and Type | Method and Description |
|---|---|
protected void |
dispose()
Releases and destroys any resource it owns.
|
Optional<EnumeratedValues> |
getEnumeratedValues(Map<String,Object> contextualParameters)
Gets the enumerated entries.
|
Optional<Searchable> |
getSearchable()
Gets the (
Searchable) the criterion belongs to. |
boolean |
isEnumerated()
Returns
true if this criterion definition is enumerated |
Map<String,Object> |
toJSON()
Gets the JSON representation of this criterion definition
|
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContextPrefixLabels, getId, getLabel, getQuery, getType, getValidator, getWidget, getWidgetParametersprivate Optional<Searchable> _searchable
public AbstractDefaultSearchCriterionDefinition(String id, String pluginName, I18nizableText label, MetadataType type, Optional<String> widget, Optional<Map<String,I18nizableText>> widgetParams, Optional<Enumerator> enumerator, Optional<Validator> validator, Optional<Object> defaultValue, Optional<Searchable> searchable)
SearchCriterionDefinitionid - The idpluginName - The plugin namelabel - The labeltype - The typewidget - The widgetwidgetParams - The widget parametersenumerator - The enumeratorvalidator - The validatordefaultValue - The default valuesearchable - the Searchablepublic Optional<Searchable> getSearchable()
SearchCriterionDefinitionSearchable) the criterion belongs to.
Optional.
If the criterion definition is brought by SearchServiceCommonImpls, then an Optional.empty() must be returned.getSearchable in interface SearchCriterionDefinitionSearchable) the criterion belongs to.public boolean isEnumerated()
SearchCriterionDefinitiontrue if this criterion definition is enumeratedisEnumerated in interface SearchCriterionDefinitiontrue if this criterion definition is enumeratedpublic Optional<EnumeratedValues> getEnumeratedValues(Map<String,Object> contextualParameters)
SearchCriterionDefinitionempty if SearchCriterionDefinition.isEnumerated() returns true.getEnumeratedValues in interface SearchCriterionDefinitioncontextualParameters - The contextual parameterspublic Map<String,Object> toJSON() throws Exception
SearchCriterionDefinitiontoJSON in interface SearchCriterionDefinitionException - if an exception occursprotected void dispose()