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
public class PageSearchCriterionDefinition extends AbstractDefaultSearchCriterionDefinition
SearchCriterionDefinition
proposing a search criterion on the page of the indexed document.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PageSearchCriterionDefinition.PageEnumeratedValues
-
Field Summary
Fields Modifier and Type Field Description private AmetysObjectResolver
_resolver
The ametys object resolver
-
Constructor Summary
Constructors Constructor Description PageSearchCriterionDefinition(String id, String pluginName, I18nizableText label, AmetysObjectResolver resolver, Optional<Searchable> searchable)
Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static Optional<String>
_widget()
private static Optional<Map<String,I18nizableText>>
_widgetParameters()
Optional<EnumeratedValues>
getEnumeratedValues(Map<String,Object> contextualParameters)
Gets the enumerated entries.Query
getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
Gets the query associated to the given valueboolean
isEnumerated()
Returnstrue
if this criterion definition is enumeratedboolean
isTooBigForStaticEnumerator()
Returnstrue
if this criterion definition is enumerated but can contains too much data-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
dispose, getSearchable, toJSON
-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.SearchCriterionDefinition
getContextPrefixLabels, getId, getLabel, getType, getValidator, getWidget, getWidgetParameters
-
-
-
-
Field Detail
-
_resolver
private AmetysObjectResolver _resolver
The ametys object resolver
-
-
Constructor Detail
-
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
- theAmetysObjectResolver
searchable
- TheSearchable
-
-
Method Detail
-
isEnumerated
public boolean isEnumerated()
Description copied from interface:SearchCriterionDefinition
Returnstrue
if this criterion definition is enumerated- Specified by:
isEnumerated
in interfaceSearchCriterionDefinition
- Overrides:
isEnumerated
in classAbstractDefaultSearchCriterionDefinition
- Returns:
true
if this criterion definition is enumerated
-
isTooBigForStaticEnumerator
public boolean isTooBigForStaticEnumerator()
Description copied from interface:SearchCriterionDefinition
Returnstrue
if this criterion definition is enumerated but can contains too much data- Returns:
true
if this criterion definition is enumerated but can contains too much data
-
getEnumeratedValues
public Optional<EnumeratedValues> getEnumeratedValues(Map<String,Object> contextualParameters)
Description copied from interface:SearchCriterionDefinition
Gets the enumerated entries.
Must be non-empty
ifSearchCriterionDefinition.isEnumerated()
returnstrue
.- Specified by:
getEnumeratedValues
in interfaceSearchCriterionDefinition
- Overrides:
getEnumeratedValues
in classAbstractDefaultSearchCriterionDefinition
- Parameters:
contextualParameters
- The contextual parameters- Returns:
- the enumerated entries
-
_widgetParameters
private static Optional<Map<String,I18nizableText>> _widgetParameters()
-
getQuery
public Query getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
Description copied from interface:SearchCriterionDefinition
Gets 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
-
-