Package org.ametys.cms.search.ui.model
Class DynamicWrappedSearchUIModel.WrappedSearchUICriterion
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<MetadataType>
-
- org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
-
- org.ametys.cms.search.ui.model.DynamicWrappedSearchUIModel.WrappedSearchUICriterion
-
- All Implemented Interfaces:
Field,SearchCriterion,SearchUICriterion,Configurable,Serviceable
- Enclosing class:
- DynamicWrappedSearchUIModel
protected class DynamicWrappedSearchUIModel.WrappedSearchUICriterion extends AbstractSearchUICriterion
Search criteria wrapper.
-
-
Field Summary
Fields Modifier and Type Field Description protected SearchUICriterion_wrappedCriterionThe wrapped search criteria.-
Fields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _cTypeEP, _resolver, _userManager, _userPopulationDAO
-
-
Constructor Summary
Constructors Constructor Description WrappedSearchUICriterion(SearchUICriterion wrappedCriteria, Enumerator enumerator)Build a search criteria wrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetChangeClassName()Get the JS class name to execute on 'change' eventStringgetContentTypeId()Get the content type ID (only when the search criteria is of type CONTENT).ObjectgetDefaultValue()Retrieves the default value.I18nizableTextgetDescription()Retrieves the description.EnumeratorgetEnumerator()Retrieves the enumerator.StringgetFieldId()Get the field identifier.StringgetId()Get the id.StringgetInitClassName()Get the JS class name to execute on 'init' eventI18nizableTextgetLabel()Retrieves the label.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.StringgetSubmitClassName()Get the JS class name to execute on 'submit' eventMetadataTypegetType()Retrieves the type.ValidatorgetValidator()Retrieves the validator.StringgetWidget()Retrieves the widget to use for rendering.Map<String,I18nizableText>getWidgetParameters()Get the widget's parametersbooleanisHidden()Determines if the criteria is hiddenbooleanisMultiple()Determines if the column value is multiple-
Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_configureI18nizableText, _initializeValidator, configure, configureId, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidgetParameters, getFacetLabel, getGroup, getMetadataDefinition, getSearchField, service, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setMultiple, setSubmitClassName
-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getPluginName, 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.SearchCriterion
getQuery, isFacetable, isSortable
-
-
-
-
Field Detail
-
_wrappedCriterion
protected SearchUICriterion _wrappedCriterion
The wrapped search criteria.
-
-
Constructor Detail
-
WrappedSearchUICriterion
public WrappedSearchUICriterion(SearchUICriterion wrappedCriteria, Enumerator enumerator)
Build a search criteria wrapper.- Parameters:
wrappedCriteria- wrapped search criteria.enumerator- the new enumerator.
-
-
Method Detail
-
getEnumerator
public Enumerator getEnumerator()
Description copied from class:ParameterRetrieves the enumerator.- Specified by:
getEnumeratorin interfaceField- Overrides:
getEnumeratorin classParameter<MetadataType>- Returns:
- the enumerator or
nullif none is defined.
-
getId
public String getId()
Description copied from class:ParameterGet the id.- Specified by:
getIdin interfaceSearchCriterion- Overrides:
getIdin classParameter<MetadataType>- Returns:
- Returns the id.
-
getLabel
public I18nizableText getLabel()
Description copied from class:ParameterRetrieves the label.- Specified by:
getLabelin interfaceSearchUICriterion- Overrides:
getLabelin classParameter<MetadataType>- Returns:
- the label.
-
getDescription
public I18nizableText getDescription()
Description copied from class:ParameterRetrieves the description.- Specified by:
getDescriptionin interfaceSearchUICriterion- Overrides:
getDescriptionin classParameter<MetadataType>- Returns:
- the description.
-
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.
-
getInitClassName
public String getInitClassName()
Description copied from class:AbstractSearchUICriterionGet the JS class name to execute on 'init' event- Specified by:
getInitClassNamein interfaceSearchUICriterion- Overrides:
getInitClassNamein classAbstractSearchUICriterion- Returns:
- the JS class name to execute on 'init' event
-
getSubmitClassName
public String getSubmitClassName()
Description copied from class:AbstractSearchUICriterionGet the JS class name to execute on 'submit' event- Specified by:
getSubmitClassNamein interfaceSearchUICriterion- Overrides:
getSubmitClassNamein classAbstractSearchUICriterion- Returns:
- the JS class name to execute on 'submit' event
-
getChangeClassName
public String getChangeClassName()
Description copied from class:AbstractSearchUICriterionGet the JS class name to execute on 'change' event- Specified by:
getChangeClassNamein interfaceSearchUICriterion- Overrides:
getChangeClassNamein classAbstractSearchUICriterion- Returns:
- the JS class name to execute on 'change' event
-
isHidden
public boolean isHidden()
Description copied from class:AbstractSearchUICriterionDetermines if the criteria is hidden- Specified by:
isHiddenin interfaceSearchUICriterion- Overrides:
isHiddenin classAbstractSearchUICriterion- Returns:
trueif the criteria is hidden
-
getType
public MetadataType getType()
Description copied from class:ParameterRetrieves the type.- Specified by:
getTypein interfaceField- Overrides:
getTypein classParameter<MetadataType>- Returns:
- the type.
-
isMultiple
public boolean isMultiple()
Description copied from class:AbstractSearchUICriterionDetermines if the column value is multiple- Specified by:
isMultiplein interfaceField- Overrides:
isMultiplein classAbstractSearchUICriterion- Returns:
trueif the value is multiple
-
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
-
getValidator
public Validator getValidator()
Description copied from class:ParameterRetrieves the validator.- Specified by:
getValidatorin interfaceSearchUICriterion- Overrides:
getValidatorin classParameter<MetadataType>- Returns:
- the validator or
nullif none is defined.
-
getDefaultValue
public Object getDefaultValue()
Description copied from class:ParameterRetrieves the default value.- Specified by:
getDefaultValuein interfaceSearchUICriterion- Overrides:
getDefaultValuein classParameter<MetadataType>- Returns:
- the default value or
nullif none is defined.
-
getContentTypeId
public String getContentTypeId()
Description copied from class:AbstractSearchUICriterionGet the content type ID (only when the search criteria is of type CONTENT).- Specified by:
getContentTypeIdin interfaceField- Overrides:
getContentTypeIdin classAbstractSearchUICriterion- Returns:
- the content type ID.
-
getOperator
public Query.Operator getOperator()
Description copied from interface:SearchCriterionGet the criterion Operator.- Returns:
- the criterion Operator.
-
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.
-
-