Class IndexingFieldAggregatorSearchUICriterion
java.lang.Object
org.ametys.runtime.parameter.Parameter<MetadataType>
org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
org.ametys.cms.search.ui.model.impl.IndexingFieldAggregatorSearchUICriterion
- All Implemented Interfaces:
Field,SearchCriterion,SearchUICriterion,LogEnabled,Disposable,Configurable,Contextualizable,Serviceable
Aggregate multiple indexing field as a unique search criteria.
The resulting query is an OR query on all the terms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentTypesHelperThe helper for convenient methods on content typesprotected ThreadSafeComponentManager<SearchUICriterion>ComponentManager for aggregatedSearchUICriterions.protected Map<String,SearchUICriterion> The map of aggregated criteriaprotected MetadataTypeThe type of the aggregated fieldsstatic final StringPrefix for id of indexing field aggregator search criteriaFields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _contentTypeExtensionPoint, _context, _enumeratorManager, _logger, _manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) protected voidconfigureId(Configuration configuration) Configure the criterion ID.voiddispose()Get the field identifier.Get the criterion Operator.getQuery(Object value, Query.Operator customOperator, Map<String, Object> allValues, String language, Map<String, Object> contextualParameters) Get theQueryassociated to the given value.getType()Retrieves the type.booleanTest if the SearchCriterion is sortable.voidservice(ServiceManager manager) Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_configureI18nizableText, _initializeValidator, configureEnumerator, configureEnumerator, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidget, configureWidgetParameters, configureWidgetParameters, configureWidgetParameters, contextualize, getChangeClassName, getContentTypeId, getGroup, getInitClassName, getSearchField, getSubmitClassName, isHidden, isMultiple, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setLogger, setMultiple, setSubmitClassNameMethods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.search.model.Field
getEnumeratorMethods inherited from interface org.ametys.cms.search.model.SearchCriterion
getDescription, getId, getLabel, getQuery, isFacetableMethods inherited from interface org.ametys.cms.search.ui.model.SearchUICriterion
getDefaultValue, getValidator, getWidget, getWidgetParameters
-
Field Details
-
SEARCH_CRITERIA_METADATA_AGGREGATOR_PREFIX
Prefix for id of indexing field aggregator search criteria- See Also:
-
_fieldCriteriaManager
ComponentManager for aggregatedSearchUICriterions. -
_fieldCriteriaMap
The map of aggregated criteria -
_contentTypesHelper
The helper for convenient methods on content types -
_type
The type of the aggregated fields
-
-
Constructor Details
-
IndexingFieldAggregatorSearchUICriterion
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractSearchUICriterion- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractSearchUICriterion- Throws:
ConfigurationException
-
configureId
Description copied from class:AbstractSearchUICriterionConfigure the criterion ID.- Overrides:
configureIdin classAbstractSearchUICriterion- Parameters:
configuration- The search criterion configuration.- Throws:
ConfigurationException- If an error occurs.
-
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.
-
dispose
- Specified by:
disposein interfaceDisposable- Overrides:
disposein classAbstractSearchUICriterion
-
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
Description copied from interface:SearchCriterionTest if the SearchCriterion is sortable.- Returns:
trueif the criterion is sortable, false otherwise.
-
getOperator
Description copied from interface:SearchCriterionGet the criterion Operator.- Returns:
- the criterion Operator.
-