Package org.ametys.web.search.model.impl
Class PageSearchUICriterion
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<MetadataType>
-
- org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
-
- org.ametys.cms.search.ui.model.impl.AbstractCustomSearchUICriterion
-
- org.ametys.web.search.model.impl.PageSearchUICriterion
-
- All Implemented Interfaces:
Field,SearchCriterion,SearchUICriterion,Configurable,Serviceable
public class PageSearchUICriterion extends AbstractCustomSearchUICriterion
CustomSearchUICriterionsearching a specific page and its sub-tree.
-
-
Field Summary
-
Fields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _cTypeEP, _resolver, _userManager, _userPopulationDAO
-
-
Constructor Summary
Constructors Constructor Description PageSearchUICriterion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration configuration)StringgetFieldId()Get the field identifier.Query.OperatorgetOperator()Get the criterion Operator.QuerygetQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)Get theQueryassociated to the given value.MetadataTypegetType()Retrieves the type.StringgetWidget()Retrieves the widget to use for rendering.Map<String,I18nizableText>getWidgetParameters()Get the widget's parametersbooleanisSortable()Test if the SearchCriterion is sortable.-
Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractCustomSearchUICriterion
configureId
-
Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_configureI18nizableText, _initializeValidator, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidgetParameters, getChangeClassName, getContentTypeId, getFacetLabel, getGroup, getInitClassName, getMetadataDefinition, getSearchField, getSubmitClassName, isHidden, isMultiple, service, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setMultiple, setSubmitClassName
-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getValidator, 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.cms.search.model.Field
getEnumerator
-
Methods inherited from interface org.ametys.cms.search.model.SearchCriterion
getId, getQuery, isFacetable
-
Methods inherited from interface org.ametys.cms.search.ui.model.SearchUICriterion
getDefaultValue, getDescription, getLabel, getValidator
-
-
-
-
Constructor Detail
-
PageSearchUICriterion
public PageSearchUICriterion()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractSearchUICriterion- Throws:
ConfigurationException
-
getType
public MetadataType getType()
Description copied from class:ParameterRetrieves the type.- Specified by:
getTypein interfaceField- Overrides:
getTypein classParameter<MetadataType>- Returns:
- the type.
-
getQuery
public Query getQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)
Description copied from interface:SearchCriterionGet theQueryassociated to the given value.- Parameters:
value- The user-submitted value (or the default value if not set) for this criterion.customOperator- In advanced search mode, the operator chosen by the user.nullto use the criterion-defined operator (simple search mode).allValues- All the user-submitted values.language- The current search language.contextualParameters- the search contextual parameters.- Returns:
Queryassociated to the given value.
-
getWidget
public String getWidget()
Description copied from class:ParameterRetrieves the widget to use for rendering.- Specified by:
getWidgetin interfaceSearchUICriterion- Overrides:
getWidgetin classParameter<MetadataType>- Returns:
- the widget or
nullif none is defined.
-
getWidgetParameters
public Map<String,I18nizableText> getWidgetParameters()
Description copied from class:ParameterGet the widget's parameters- Specified by:
getWidgetParametersin interfaceSearchUICriterion- Overrides:
getWidgetParametersin classParameter<MetadataType>- Returns:
- the widget's parameters
-
getFieldId
public String getFieldId()
Description copied from interface:SearchUICriterionGet the field identifier. Used to match standard, advanced and faceted criterion (even if the operator is different), whatever their ID is.- Returns:
- the field identifier.
-
isSortable
public boolean isSortable()
Description copied from interface:SearchCriterionTest if the SearchCriterion is sortable.- Returns:
trueif the criterion is sortable, false otherwise.
-
getOperator
public Query.Operator getOperator()
Description copied from interface:SearchCriterionGet the criterion Operator.- Returns:
- the criterion Operator.
-
-