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
,LogEnabled
,Disposable
,Configurable
,Contextualizable
,Serviceable
- Enclosing class:
- DynamicWrappedSearchUIModel
protected class DynamicWrappedSearchUIModel.WrappedSearchUICriterion
extends AbstractSearchUICriterion
Search criteria wrapper.
-
Field Summary
Fields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _contentTypeExtensionPoint, _context, _enumeratorManager, _logger, _manager
-
Constructor Summary
ConstructorDescriptionWrappedSearchUICriterion
(SearchUICriterion wrappedCriteria, Enumerator enumerator) Build a search criteria wrapper. -
Method Summary
Modifier and TypeMethodDescriptionGet the JS class name to execute on 'change' eventGet the content type ID (only when the search criteria is of type CONTENT).Retrieves the default value.Retrieves the description.Retrieves the enumerator.Get the field identifier.getId()
Get the id.Get the JS class name to execute on 'init' eventgetLabel()
Retrieves the label.Get the criterion Operator.getQuery
(Object value, Query.Operator customOperator, Map<String, Object> allValues, String language, Map<String, Object> contextualParameters) Get theQuery
associated to the given value.Get the JS class name to execute on 'submit' eventgetType()
Retrieves the type.Retrieves the validator.Retrieves the widget to use for rendering.Get the widget's parametersboolean
isHidden()
Determines if the criteria is hiddenboolean
Determines if the column value is multipleMethods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_configureI18nizableText, _initializeValidator, configure, configureEnumerator, configureEnumerator, configureId, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidget, configureWidgetParameters, configureWidgetParameters, configureWidgetParameters, contextualize, dispose, getGroup, getSearchField, service, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setLogger, 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 Details
-
_wrappedCriterion
The wrapped search criteria.
-
-
Constructor Details
-
WrappedSearchUICriterion
Build a search criteria wrapper.- Parameters:
wrappedCriteria
- wrapped search criteria.enumerator
- the new enumerator.
-
-
Method Details
-
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
Description copied from class:Parameter
Get the id.- Specified by:
getId
in interfaceSearchCriterion
- Overrides:
getId
in classParameter<MetadataType>
- Returns:
- Returns the id.
-
getLabel
Description copied from class:Parameter
Retrieves the label.- Specified by:
getLabel
in interfaceSearchCriterion
- Overrides:
getLabel
in classParameter<MetadataType>
- Returns:
- the label.
-
getDescription
Description copied from class:Parameter
Retrieves the description.- Specified by:
getDescription
in interfaceSearchCriterion
- Overrides:
getDescription
in classParameter<MetadataType>
- Returns:
- the description.
-
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
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
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
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
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
Description copied from class:Parameter
Retrieves the type.- Specified by:
getType
in interfaceField
- Overrides:
getType
in classParameter<MetadataType>
- Returns:
- the type.
-
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
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
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
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
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
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
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.
-