Interface SearchServiceCriterionDefinition<T>
- Type Parameters:
T- Type of the criterion value
- All Superinterfaces:
Comparable<ModelItem>,CriterionDefinition<T>,ElementDefinition<T>,Labelable,ModelItem,ModifiableLabelable
- All Known Implementing Classes:
AbstractSearchServiceCriterionDefinition,ContentReferencingSearchServiceCriterionDefinition,DegreeUniversityCriterionDefinition,DublinCoreCriterionDefinition,PageCriterionDefinition,PageTitleCriterionDefinition,ReferencingSearchServiceCriterionDefinition,ResourceFormatCriterionDefinition,SiteCriterionDefinition,SitemapCriterionDefinition,TagCriterionDefinition,TitleOrWordingCriterionDefinition,WordingCriterionDefinition
A potential criterion definition proposed to the creator of an instance of search service.
-
Field Summary
Fields inherited from interface org.ametys.runtime.model.ElementDefinition
CONFIG_DEFAULT_VALUE_TYPEFields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR -
Method Summary
Modifier and TypeMethodDescriptiondefault TconvertRestrictedValue(Object value, Map<String, Object> contextualParameters) Converts the given value forRestrictedEnumeratordefault StringfacetValueToSAX(String value, Map<String, Object> contextualParameters) Retrieves the facet value to use for SAX eventsdefault List<I18nizableText> Gets the prefix labels, sometimes useful (such as for displaying all criterion definitions) for grouping information.getEmptyValueQuery(String language, Map<String, Object> contextualParameters) Gets the query for testing the value is emptygetRestrictedEnumerator(Map<String, Object> contextualParameters) Gets theRestrictedEnumeratorused by the final user to fill the criterion.Gets the (Searchable) the criterion belongs to.booleanDetermines if this criterion definition is enumeratedvoidsetSearchable(Searchable searchable) Sets the (Searchable) the criterion belongs to.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.ametys.cms.search.model.CriterionDefinition
convertQueryValue, getJoinedPaths, getQuery, getQuery, getQuery, getSolrFacetFieldName, getTypeMethods inherited from interface org.ametys.runtime.model.ElementDefinition
getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, isEditable, isMultiple, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setValidator, setValidatorConfigurationMethods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getNameMethods inherited from interface org.ametys.runtime.model.ModelItem
addItemChecker, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSON, toSAXMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
Method Details
-
getContextPrefixLabels
Gets the prefix labels, sometimes useful (such as for displaying all criterion definitions) for grouping information.- Returns:
- The prefix labels (can be empty)
-
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.
-
setSearchable
Sets the (Searchable) the criterion belongs to.- Parameters:
searchable- theSearchableto set
-
isEnumerated
boolean isEnumerated()Determines if this criterion definition is enumerated- Returns:
trueif this criterion definition is enumerated,falseotherwise
-
getRestrictedEnumerator
Gets theRestrictedEnumeratorused by the final user to fill the criterion. Values of thisEnumeratorcan be restricted according to entered values during service configuration- Parameters:
contextualParameters- The contextual parameters- Returns:
- the enumerated entries
-
convertRestrictedValue
Converts the given value forRestrictedEnumerator- Parameters:
value- the value to convertcontextualParameters- The contextual parameters- Returns:
- the converted value
-
getEmptyValueQuery
Gets the query for testing the value is empty- Parameters:
language- The current search language.contextualParameters- the search contextual parameters.- Returns:
- the query for testing the value is empty
-
facetValueToSAX
Retrieves the facet value to use for SAX events- Parameters:
value- the facet valuecontextualParameters- the contextual parameters- Returns:
- the facet value to use for SAX events
-