Interface SearchCriterionDefinition
- 
- All Known Subinterfaces:
- FrontEnumerableSearchCriterionDefinition
 - All Known Implementing Classes:
- AbstractDefaultSearchCriterionDefinition,- ContentAttributeContentSearchCriterionDefinition,- ContentSearchCriterionDefinition,- DublinCoreSearchCriterionDefinition,- PageSearchCriterionDefinition,- PageTitleSearchCriterionDefinition,- ResourceFormatSearchCriterionDefinition,- SitemapSearchCriterionDefinition,- SiteSearchCriterionDefinition,- TagSearchCriterionDefinition,- WordingSearchCriterionDefinition
 
 public interface SearchCriterionDefinition A potential search criterion proposed to the creator of an instance of search service.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default List<I18nizableText>getContextPrefixLabels()Gets the prefix labels, sometimes useful (such as for displaying all criterion definitions) for grouping information.Optional<EnumeratedValues>getEnumeratedValues(Map<String,Object> contextualParameters)Gets the enumerated entries.StringgetId()Gets the id of the criterion.I18nizableTextgetLabel()Gets the label of the criterion.QuerygetQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)Gets the query associated to the given valueOptional<Searchable>getSearchable()Gets the (Searchable) the criterion belongs to.MetadataTypegetType()Gets the type of criterionValidatorgetValidator()Gets the validatorStringgetWidget()Gets the widgetMap<String,I18nizableText>getWidgetParameters()Gets the widget parametersbooleanisEnumerated()Returnstrueif this criterion definition is enumerateddefault booleanisTooBigForStaticEnumerator()Returnstrueif this criterion definition is enumerated but can contains too much dataMap<String,Object>toJSON()Gets the JSON representation of this criterion definition
 
- 
- 
- 
Method Detail- 
getIdString getId() Gets the id of the criterion. It must be unique across all criterion definitions- Returns:
- the unique id of the criterion
 
 - 
getLabelI18nizableText getLabel() Gets the label of the criterion.- Returns:
- the label of the criterion.
 
 - 
getContextPrefixLabelsdefault List<I18nizableText> getContextPrefixLabels() Gets the prefix labels, sometimes useful (such as for displaying all criterion definitions) for grouping information.- Returns:
- The prefix labels (can be empty)
 
 - 
getSearchableOptional<Searchable> getSearchable() Gets the (Searchable) the criterion belongs to.
 Important: if the criterion definition is brought by a specific Searchable, then this searchable must be returned in a non-emptyOptional. If the criterion definition is brought bySearchServiceCommonImpls, then anOptional.empty()must be returned.- Returns:
- the (Searchable) the criterion belongs to.
 
 - 
getTypeMetadataType getType() Gets the type of criterion- Returns:
- the type of criterion
 
 - 
isEnumeratedboolean isEnumerated() Returnstrueif this criterion definition is enumerated- Returns:
- trueif this criterion definition is enumerated
 
 - 
getEnumeratedValuesOptional<EnumeratedValues> getEnumeratedValues(Map<String,Object> contextualParameters) - Parameters:
- contextualParameters- The contextual parameters
- Returns:
- the enumerated entries
 
 - 
isTooBigForStaticEnumeratordefault boolean isTooBigForStaticEnumerator() Returnstrueif this criterion definition is enumerated but can contains too much data- Returns:
- trueif this criterion definition is enumerated but can contains too much data
 
 - 
getWidgetParametersMap<String,I18nizableText> getWidgetParameters() Gets the widget parameters- Returns:
- the widget parameters
 
 - 
getValidatorValidator getValidator() Gets the validator- Returns:
- the validator
 
 - 
toJSONMap<String,Object> toJSON() throws Exception Gets the JSON representation of this criterion definition- Returns:
- the JSON representation of this criterion definition
- Throws:
- Exception- if an exception occurs
 
 - 
getQueryQuery getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters) Gets the query associated to the given value- Parameters:
- value- the value
- operator- the operator
- language- The current search language.
- contextualParameters- the search contextual parameters.
- Returns:
- the query associated to the given value
 
 
- 
 
-