Class SystemSearchUICriterion
java.lang.Object
org.ametys.runtime.parameter.Parameter<MetadataType>
org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
org.ametys.cms.search.ui.model.impl.SystemSearchUICriterion
- All Implemented Interfaces:
Field,SearchCriterion,SystemSearchCriterion,SearchUICriterion,LogEnabled,Disposable,Configurable,Contextualizable,Serviceable
public class SystemSearchUICriterion
extends AbstractSearchUICriterion
implements SystemSearchCriterion
This class is a search criteria on a system property (author, lastModified, with-comments, ...)
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe join pathsprotected ContentSearchHelperThe content search helper.protected SystemPropertyExtensionPointThe system property extension point.protected ThreadSafeComponentManager<Validator>ComponentManager forValidators.static final StringPrefix for id of system property search criteriaFields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _context, _cTypeEP, _enumeratorManager, _logger, _manager, _resolver, _userManager, _userPopulationDAO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) voiddispose()Get the field identifier.Get the operator.getQuery(Object value, Query.Operator customOperator, Map<String, Object> allValues, String language, Map<String, Object> contextualParameters) Get theQueryassociated to the given value.Get theSearchFieldrepresenting this search criterion.Get id of this system propertybooleanTest if the criterion can be set as a facet (i.e.booleanisJoined()Returnstrueif the criterion is joinedvoidservice(ServiceManager manager) Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_configureI18nizableText, _initializeValidator, configureEnumerator, configureEnumerator, configureId, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidget, configureWidgetParameters, configureWidgetParameters, configureWidgetParameters, contextualize, getChangeClassName, getContentTypeId, getFacetLabel, getGroup, getInitClassName, 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, getType, 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
getContentTypeId, getEnumerator, getType, isMultipleMethods inherited from interface org.ametys.cms.search.model.SearchCriterion
getId, getQuery, isSortableMethods inherited from interface org.ametys.cms.search.ui.model.SearchUICriterion
getDefaultValue, getDescription, getLabel, getValidator, getWidget, getWidgetParameters
-
Field Details
-
SEARCH_CRITERION_SYSTEM_PREFIX
Prefix for id of system property search criteria- See Also:
-
_validatorManager
ComponentManager forValidators. -
_systemPropEP
The system property extension point. -
_searchHelper
The content search helper. -
_joinPaths
The join paths
-
-
Constructor Details
-
SystemSearchUICriterion
public SystemSearchUICriterion()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractSearchUICriterion- Throws:
ServiceException
-
dispose
- Specified by:
disposein interfaceDisposable- Overrides:
disposein classAbstractSearchUICriterion
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractSearchUICriterion- Throws:
ConfigurationException
-
isJoined
Description copied from interface:SystemSearchCriterionReturnstrueif the criterion is joined- Specified by:
isJoinedin interfaceSystemSearchCriterion- Returns:
trueif the criterion is joined
-
isFacetable
Description copied from interface:SearchCriterionTest if the criterion can be set as a facet (i.e. it has a defined list of discrete values).- Specified by:
isFacetablein interfaceSearchCriterion- Returns:
- true if the criterion can be set as a facet, false otherwise.
-
getOperator
Get the operator.- Specified by:
getOperatorin interfaceSearchCriterion- Returns:
- the operator.
-
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.- Specified by:
getFieldIdin interfaceSearchUICriterion- Returns:
- the field identifier.
-
getSystemPropertyId
Get id of this system property- Specified by:
getSystemPropertyIdin interfaceSystemSearchCriterion- Returns:
- The system property's id
-
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.- Specified by:
getQueryin 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.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.
-
getSearchField
Description copied from interface:SearchCriterionGet theSearchFieldrepresenting this search criterion.- Specified by:
getSearchFieldin interfaceSearchCriterion- Overrides:
getSearchFieldin classAbstractSearchUICriterion- Returns:
- the
SearchFieldrepresenting this search criterion.
-