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
public class IndexingFieldAggregatorSearchUICriterion
extends AbstractSearchUICriterion
implements Contextualizable, Disposable, LogEnabled
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 ContentTypesHelper
The helper for convenient methods on content typesprotected Context
The context.protected ThreadSafeComponentManager<SearchUICriterion>
ComponentManager for aggregatedSearchUICriterion
s.protected Map<String,
SearchUICriterion> The map of aggregated criteriaprotected Logger
The loggerprotected ServiceManager
The service managerprotected MetadataType
The type of the aggregated fieldsstatic final String
Prefix for id of indexing field aggregator search criteriaFields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _cTypeEP, _resolver, _userManager, _userPopulationDAO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) protected void
configureId
(Configuration configuration) Configure the criterion ID.void
contextualize
(Context context) void
dispose()
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 theQuery
associated to the given value.getType()
Retrieves the type.boolean
Test if the SearchCriterion is sortable.void
service
(ServiceManager manager) void
Called at creation time to provide aLogger
.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, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setMultiple, setSubmitClassName
Methods 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, 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, getWidget, getWidgetParameters
-
Field Details
-
SEARCH_CRITERIA_METADATA_AGGREGATOR_PREFIX
Prefix for id of indexing field aggregator search criteria- See Also:
-
_fieldCriteriaManager
ComponentManager for aggregatedSearchUICriterion
s. -
_fieldCriteriaMap
The map of aggregated criteria -
_logger
The logger -
_manager
The service manager -
_contentTypesHelper
The helper for convenient methods on content types -
_context
The context. -
_type
The type of the aggregated fields
-
-
Constructor Details
-
IndexingFieldAggregatorSearchUICriterion
-
-
Method Details
-
setLogger
Description copied from interface:LogEnabled
Called at creation time to provide aLogger
.- Specified by:
setLogger
in interfaceLogEnabled
- Parameters:
logger
- aLogger
for messages.
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSearchUICriterion
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractSearchUICriterion
- Throws:
ConfigurationException
-
configureId
Description copied from class:AbstractSearchUICriterion
Configure the criterion ID.- Overrides:
configureId
in classAbstractSearchUICriterion
- Parameters:
configuration
- The search criterion configuration.- Throws:
ConfigurationException
- If an error occurs.
-
getType
Description copied from class:Parameter
Retrieves the type.- Specified by:
getType
in interfaceField
- Overrides:
getType
in 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:SearchCriterion
Get theQuery
associated to the given value.- Specified by:
getQuery
in interfaceSearchCriterion
- 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.
-
dispose
- Specified by:
dispose
in interfaceDisposable
-
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.- Specified by:
getFieldId
in interfaceSearchUICriterion
- Returns:
- the field identifier.
-
isSortable
Description copied from interface:SearchCriterion
Test if the SearchCriterion is sortable.- Specified by:
isSortable
in interfaceSearchCriterion
- Returns:
true
if the criterion is sortable, false otherwise.
-
getOperator
Description copied from interface:SearchCriterion
Get the criterion Operator.- Specified by:
getOperator
in interfaceSearchCriterion
- Returns:
- the criterion Operator.
-