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, setWidgetParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContextPrefixLabels, getId, getLabel, getQuery, getType, getValidator, getWidget, getWidgetParameters
private 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)
SearchCriterionDefinition
id
- The idpluginName
- The plugin namelabel
- The labeltype
- The typewidget
- The widgetwidgetParams
- The widget parametersenumerator
- The enumeratorvalidator
- The validatordefaultValue
- The default valuesearchable
- the Searchable
public Optional<Searchable> getSearchable()
SearchCriterionDefinition
Searchable
) the criterion belongs to.
Optional
.
If the criterion definition is brought by SearchServiceCommonImpls
, then an Optional.empty()
must be returned.getSearchable
in interface SearchCriterionDefinition
Searchable
) the criterion belongs to.public boolean isEnumerated()
SearchCriterionDefinition
true
if this criterion definition is enumeratedisEnumerated
in interface SearchCriterionDefinition
true
if this criterion definition is enumeratedpublic Optional<EnumeratedValues> getEnumeratedValues(Map<String,Object> contextualParameters)
SearchCriterionDefinition
empty
if SearchCriterionDefinition.isEnumerated()
returns true
.getEnumeratedValues
in interface SearchCriterionDefinition
contextualParameters
- The contextual parameterspublic Map<String,Object> toJSON() throws Exception
SearchCriterionDefinition
toJSON
in interface SearchCriterionDefinition
Exception
- if an exception occursprotected void dispose()