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
_wrappedCriterion
The 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 String
getChangeClassName()
Get the JS class name to execute on 'change' eventString
getContentTypeId()
Get the content type ID (only when the search criteria is of type CONTENT).Object
getDefaultValue()
Retrieves the default value.I18nizableText
getDescription()
Retrieves the description.Enumerator
getEnumerator()
Retrieves the enumerator.String
getFieldId()
Get the field identifier.String
getId()
Get the id.String
getInitClassName()
Get the JS class name to execute on 'init' eventI18nizableText
getLabel()
Retrieves the label.Query.Operator
getOperator()
Get the criterion Operator.Query
getQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)
Get theQuery
associated to the given value.String
getSubmitClassName()
Get the JS class name to execute on 'submit' eventMetadataType
getType()
Retrieves the type.Validator
getValidator()
Retrieves the validator.String
getWidget()
Retrieves the widget to use for rendering.Map<String,I18nizableText>
getWidgetParameters()
Get the widget's parametersboolean
isHidden()
Determines if the criteria is hiddenboolean
isMultiple()
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:Parameter
Retrieves the enumerator.- Specified by:
getEnumerator
in interfaceField
- Overrides:
getEnumerator
in classParameter<MetadataType>
- Returns:
- the enumerator or
null
if none is defined.
-
getId
public String getId()
Description copied from class:Parameter
Get the id.- Specified by:
getId
in interfaceSearchCriterion
- Overrides:
getId
in classParameter<MetadataType>
- Returns:
- Returns the id.
-
getLabel
public I18nizableText getLabel()
Description copied from class:Parameter
Retrieves the label.- Specified by:
getLabel
in interfaceSearchUICriterion
- Overrides:
getLabel
in classParameter<MetadataType>
- Returns:
- the label.
-
getDescription
public I18nizableText getDescription()
Description copied from class:Parameter
Retrieves the description.- Specified by:
getDescription
in interfaceSearchUICriterion
- Overrides:
getDescription
in classParameter<MetadataType>
- Returns:
- the description.
-
getFieldId
public String getFieldId()
Description copied from interface:SearchUICriterion
Get 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:AbstractSearchUICriterion
Get the JS class name to execute on 'init' event- Specified by:
getInitClassName
in interfaceSearchUICriterion
- Overrides:
getInitClassName
in classAbstractSearchUICriterion
- Returns:
- the JS class name to execute on 'init' event
-
getSubmitClassName
public String getSubmitClassName()
Description copied from class:AbstractSearchUICriterion
Get the JS class name to execute on 'submit' event- Specified by:
getSubmitClassName
in interfaceSearchUICriterion
- Overrides:
getSubmitClassName
in classAbstractSearchUICriterion
- Returns:
- the JS class name to execute on 'submit' event
-
getChangeClassName
public String getChangeClassName()
Description copied from class:AbstractSearchUICriterion
Get the JS class name to execute on 'change' event- Specified by:
getChangeClassName
in interfaceSearchUICriterion
- Overrides:
getChangeClassName
in classAbstractSearchUICriterion
- Returns:
- the JS class name to execute on 'change' event
-
isHidden
public boolean isHidden()
Description copied from class:AbstractSearchUICriterion
Determines if the criteria is hidden- Specified by:
isHidden
in interfaceSearchUICriterion
- Overrides:
isHidden
in classAbstractSearchUICriterion
- Returns:
true
if the criteria is hidden
-
getType
public MetadataType getType()
Description copied from class:Parameter
Retrieves the type.- Specified by:
getType
in interfaceField
- Overrides:
getType
in classParameter<MetadataType>
- Returns:
- the type.
-
isMultiple
public boolean isMultiple()
Description copied from class:AbstractSearchUICriterion
Determines if the column value is multiple- Specified by:
isMultiple
in interfaceField
- Overrides:
isMultiple
in classAbstractSearchUICriterion
- Returns:
true
if the value is multiple
-
getWidget
public String getWidget()
Description copied from class:Parameter
Retrieves the widget to use for rendering.- Specified by:
getWidget
in interfaceSearchUICriterion
- Overrides:
getWidget
in classParameter<MetadataType>
- Returns:
- the widget or
null
if none is defined.
-
getWidgetParameters
public Map<String,I18nizableText> getWidgetParameters()
Description copied from class:Parameter
Get the widget's parameters- Specified by:
getWidgetParameters
in interfaceSearchUICriterion
- Overrides:
getWidgetParameters
in classParameter<MetadataType>
- Returns:
- the widget's parameters
-
getValidator
public Validator getValidator()
Description copied from class:Parameter
Retrieves the validator.- Specified by:
getValidator
in interfaceSearchUICriterion
- Overrides:
getValidator
in classParameter<MetadataType>
- Returns:
- the validator or
null
if none is defined.
-
getDefaultValue
public Object getDefaultValue()
Description copied from class:Parameter
Retrieves the default value.- Specified by:
getDefaultValue
in interfaceSearchUICriterion
- Overrides:
getDefaultValue
in classParameter<MetadataType>
- Returns:
- the default value or
null
if none is defined.
-
getContentTypeId
public String getContentTypeId()
Description copied from class:AbstractSearchUICriterion
Get the content type ID (only when the search criteria is of type CONTENT).- Specified by:
getContentTypeId
in interfaceField
- Overrides:
getContentTypeId
in classAbstractSearchUICriterion
- Returns:
- the content type ID.
-
getOperator
public Query.Operator getOperator()
Description copied from interface:SearchCriterion
Get 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:SearchCriterion
Get theQuery
associated 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.null
to 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:
Query
associated to the given value.
-
-