Class PageSearchCriterionDefinition
java.lang.Object
org.ametys.runtime.parameter.Parameter<MetadataType>
org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
org.ametys.web.frontoffice.search.metamodel.impl.PageSearchCriterionDefinition
- All Implemented Interfaces:
SearchCriterionDefinition
SearchCriterionDefinition proposing a search criterion on the page of the indexed document.-
Constructor Summary
ConstructorsConstructorDescriptionPageSearchCriterionDefinition(String id, String pluginName, I18nizableText label, AmetysObjectResolver resolver, Optional<Searchable> searchable) Default constructor -
Method Summary
Modifier and TypeMethodDescriptiongetEmptyValueQuery(String language, Map<String, Object> contextualParameters) Gets the query for testing the value is emptygetEnumeratedValues(Map<String, Object> contextualParameters) Gets the enumerated entries.getQuery(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Gets the query associated to the given valueRetrieves the validator.booleanReturnstrueif this criterion definition is enumeratedbooleanReturnstrueif this criterion definition is enumerated but can contains too much dataMethods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
dispose, getSearchable, toJSONMethods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.web.frontoffice.search.metamodel.SearchCriterionDefinition
getContextPrefixLabels, getId, getLabel, getType, getWidget, getWidgetParameters
-
Constructor Details
-
PageSearchCriterionDefinition
public PageSearchCriterionDefinition(String id, String pluginName, I18nizableText label, AmetysObjectResolver resolver, Optional<Searchable> searchable) Default constructor- Parameters:
id- The idpluginName- The plugin namelabel- The labelresolver- theAmetysObjectResolversearchable- TheSearchable
-
-
Method Details
-
isEnumerated
Description copied from interface:SearchCriterionDefinitionReturnstrueif this criterion definition is enumerated- Specified by:
isEnumeratedin interfaceSearchCriterionDefinition- Overrides:
isEnumeratedin classAbstractDefaultSearchCriterionDefinition- Returns:
trueif this criterion definition is enumerated
-
isTooBigForStaticEnumerator
Description copied from interface:SearchCriterionDefinitionReturnstrueif this criterion definition is enumerated but can contains too much data- Specified by:
isTooBigForStaticEnumeratorin interfaceSearchCriterionDefinition- Overrides:
isTooBigForStaticEnumeratorin classAbstractDefaultSearchCriterionDefinition- Returns:
trueif this criterion definition is enumerated but can contains too much data
-
getEnumeratedValues
Description copied from interface:SearchCriterionDefinitionGets the enumerated entries.
Must be non-emptyifSearchCriterionDefinition.isEnumerated()returnstrue.- Specified by:
getEnumeratedValuesin interfaceSearchCriterionDefinition- Overrides:
getEnumeratedValuesin classAbstractDefaultSearchCriterionDefinition- Parameters:
contextualParameters- The contextual parameters- Returns:
- the enumerated entries
-
getQuery
public Query getQuery(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Description copied from interface:SearchCriterionDefinitionGets the query associated to the given value- Parameters:
value- the valueoperator- the operatorlanguage- The current search language.contextualParameters- the search contextual parameters.- Returns:
- the query associated to the given value
-
getValidator
Description copied from class:ParameterRetrieves the validator.- Specified by:
getValidatorin interfaceSearchCriterionDefinition- Overrides:
getValidatorin classParameter<MetadataType>- Returns:
- the validator or
nullif none is defined.
-
getEmptyValueQuery
Description copied from interface:SearchCriterionDefinitionGets 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
-