public class ContentSearchCriterionDefinition extends AbstractDefaultSearchCriterionDefinition
SearchCriterionDefinition for ContentSearchable proposing a search criterion (based on a SearchUICriterion).| Modifier and Type | Field and Description |
|---|---|
protected Optional<ContentType> |
_contentType
The content type on which this criterion definition applies.
|
protected SearchUICriterion |
_searchUICriterion
The SearchUICriterion
|
| Constructor and Description |
|---|
ContentSearchCriterionDefinition(String id,
String pluginName,
Optional<Searchable> searchable,
SearchUICriterion criterion,
Optional<ContentType> contentType)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
List<I18nizableText> |
getContextPrefixLabels()
Gets the prefix labels, sometimes useful (such as for displaying all criterion definitions) for grouping information.
|
Query |
getQuery(Object value,
Query.Operator operator,
String language,
Map<String,Object> contextualParameters)
Gets the query associated to the given value
|
SearchUICriterion |
getSearchUICriterion()
Gets the
SearchUICriterion associated to this definition |
Map<String,Object> |
toJSON()
Gets the JSON representation of this criterion definition
|
dispose, getEnumeratedValues, getSearchable, isEnumeratedgetDefaultValue, 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, waitgetId, getLabel, getType, getValidator, getWidget, getWidgetParametersprotected SearchUICriterion _searchUICriterion
protected Optional<ContentType> _contentType
public ContentSearchCriterionDefinition(String id, String pluginName, Optional<Searchable> searchable, SearchUICriterion criterion, Optional<ContentType> contentType)
id - The idpluginName - The plugin namesearchable - the Searchablecriterion - The linked SearchUICriterioncontentType - The content type on which this criterion definition applies. Can be empty if it applies to all types of contents.public SearchUICriterion getSearchUICriterion()
SearchUICriterion associated to this definitionSearchUICriterion associated to this definitionpublic List<I18nizableText> getContextPrefixLabels()
SearchCriterionDefinitionpublic Map<String,Object> toJSON() throws Exception
SearchCriterionDefinitiontoJSON in interface SearchCriterionDefinitiontoJSON in class AbstractDefaultSearchCriterionDefinitionException - if an exception occurspublic Query getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
SearchCriterionDefinitionvalue - the valueoperator - the operatorlanguage - The current search language.contextualParameters - the search contextual parameters.