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, Contextualizable, LogEnabled, Disposable This class is a search criteria on a system property (author, lastModified, with-comments, ...)
- 
- 
Field SummaryFields Modifier and Type Field Description private Set<String>_contentTypesprivate Context_contextprotected ThreadSafeComponentManager<Enumerator>_enumeratorManagerComponentManager forEnumerators.private String_fullPathprotected List<String>_joinPathsThe join pathsprivate org.slf4j.Logger_loggerprivate ServiceManager_managerprivate Query.Operator_operatorprotected SystemPropertyExtensionPoint_systemPropEPThe system property extension point.private SystemProperty_systemPropertyprotected ThreadSafeComponentManager<Validator>_validatorManagerComponentManager forValidators.static StringSEARCH_CRITERION_SYSTEM_PREFIXPrefix for id of system property search criteria- 
Fields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion_contentHelper, _cTypeEP, _resolver, _userManager, _userPopulationDAO
 
- 
 - 
Constructor SummaryConstructors Constructor Description SystemSearchUICriterion()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description private MetadataType_computeJoinPaths(IndexingField indexingField, String[] remainingPathSegments, List<String> joinPaths)Get the indexing field type and compute the join paths.private List<String>_configureJoinPaths(String joinPath, Set<String> contentTypeIds, Configuration configuration)Configure the join paths.private Configuration_getEnumeratorAndWidgetParamConf(Configuration critConf)private String_initializeEnumerator(SystemProperty.EnumeratorDefinition enumDef)private Collection<String>_typeAndSubTypes(List<String> singletonType)voidconfigure(Configuration configuration)voidcontextualize(Context context)voiddispose()StringgetFieldId()Get the field identifier.Query.OperatorgetOperator()Get the operator.QuerygetQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)Get theQueryassociated to the given value.SearchFieldgetSearchField()Get theSearchFieldrepresenting this search criterion.StringgetSystemPropertyId()Get id of this system propertybooleanisFacetable()Test if the criterion can be set as a facet (i.e.booleanisJoined()Returnstrueif the criterion is joinedvoidservice(ServiceManager manager)voidsetLogger(org.slf4j.Logger logger)Called at creation time to provide aLogger.- 
Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion_configureI18nizableText, _initializeValidator, configureId, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidgetParameters, getChangeClassName, getContentTypeId, getFacetLabel, getGroup, getInitClassName, getMetadataDefinition, getSubmitClassName, isHidden, isMultiple, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setMultiple, setSubmitClassName
 - 
Methods inherited from class org.ametys.runtime.parameter.ParametergetDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.ametys.cms.search.model.FieldgetContentTypeId, getEnumerator, getType, isMultiple
 - 
Methods inherited from interface org.ametys.cms.search.model.SearchCriteriongetId, getQuery, isSortable
 - 
Methods inherited from interface org.ametys.cms.search.ui.model.SearchUICriteriongetDefaultValue, getDescription, getLabel, getValidator, getWidget, getWidgetParameters
 
- 
 
- 
- 
- 
Field Detail- 
SEARCH_CRITERION_SYSTEM_PREFIXpublic static final String SEARCH_CRITERION_SYSTEM_PREFIX Prefix for id of system property search criteria- See Also:
- Constant Field Values
 
 - 
_validatorManagerprotected ThreadSafeComponentManager<Validator> _validatorManager ComponentManager forValidators.
 - 
_enumeratorManagerprotected ThreadSafeComponentManager<Enumerator> _enumeratorManager ComponentManager forEnumerators.
 - 
_systemPropEPprotected SystemPropertyExtensionPoint _systemPropEP The system property extension point.
 - 
_joinPathsprotected List<String> _joinPaths The join paths
 - 
_operatorprivate Query.Operator _operator 
 - 
_systemPropertyprivate SystemProperty _systemProperty 
 - 
_contentTypesprivate Set<String> _contentTypes 
 - 
_managerprivate ServiceManager _manager 
 - 
_loggerprivate org.slf4j.Logger _logger 
 
- 
 - 
Constructor Detail- 
SystemSearchUICriterionpublic SystemSearchUICriterion() 
 
- 
 - 
Method Detail- 
contextualizepublic void contextualize(Context context) throws ContextException - Specified by:
- contextualizein interface- Contextualizable
- Throws:
- ContextException
 
 - 
setLoggerpublic void setLogger(org.slf4j.Logger logger) Description copied from interface:LogEnabledCalled at creation time to provide aLogger.- Specified by:
- setLoggerin interface- LogEnabled
- Parameters:
- logger- a- Loggerfor messages.
 
 - 
servicepublic void service(ServiceManager manager) throws ServiceException - Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- AbstractSearchUICriterion
- Throws:
- ServiceException
 
 - 
disposepublic void dispose() - Specified by:
- disposein interface- Disposable
 
 - 
configurepublic void configure(Configuration configuration) throws ConfigurationException - Specified by:
- configurein interface- Configurable
- Overrides:
- configurein class- AbstractSearchUICriterion
- Throws:
- ConfigurationException
 
 - 
_getEnumeratorAndWidgetParamConfprivate Configuration _getEnumeratorAndWidgetParamConf(Configuration critConf) throws ConfigurationException - Throws:
- ConfigurationException
 
 - 
isJoinedpublic boolean isJoined() Description copied from interface:SystemSearchCriterionReturnstrueif the criterion is joined- Specified by:
- isJoinedin interface- SystemSearchCriterion
- Returns:
- trueif the criterion is joined
 
 - 
isFacetablepublic boolean 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 interface- SearchCriterion
- Returns:
- true if the criterion can be set as a facet, false otherwise.
 
 - 
getOperatorpublic Query.Operator getOperator() Get the operator.- Specified by:
- getOperatorin interface- SearchCriterion
- Returns:
- the operator.
 
 - 
getFieldIdpublic String 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 interface- SearchUICriterion
- Returns:
- the field identifier.
 
 - 
getSystemPropertyIdpublic String getSystemPropertyId() Get id of this system property- Specified by:
- getSystemPropertyIdin interface- SystemSearchCriterion
- Returns:
- The system property's id
 
 - 
getQuerypublic 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 interface- SearchCriterion
- 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.
 
 - 
getSearchFieldpublic SearchField getSearchField() Description copied from interface:SearchCriterionGet theSearchFieldrepresenting this search criterion.- Specified by:
- getSearchFieldin interface- SearchCriterion
- Overrides:
- getSearchFieldin class- AbstractSearchUICriterion
- Returns:
- the SearchFieldrepresenting this search criterion.
 
 - 
_configureJoinPathsprivate List<String> _configureJoinPaths(String joinPath, Set<String> contentTypeIds, Configuration configuration) throws ConfigurationException Configure the join paths.- Parameters:
- joinPath- The full join path.
- contentTypeIds- The base content type identifiers.
- configuration- The configuration of the criterion
- Returns:
- The list of join paths.
- Throws:
- ConfigurationException- If the join paths are missconfigured
 
 - 
_computeJoinPathsprivate MetadataType _computeJoinPaths(IndexingField indexingField, String[] remainingPathSegments, List<String> joinPaths) throws ConfigurationException Get the indexing field type and compute the join paths.- Parameters:
- indexingField- The initial indexing field
- remainingPathSegments- The path to access the metadata or an another indexing field from the initial indexing field
- joinPaths- The consecutive's path in case of joint to access the field/metadata
- Returns:
- The metadata definition or null if not found
- Throws:
- ConfigurationException- If an error occurs.
 
 - 
_typeAndSubTypesprivate Collection<String> _typeAndSubTypes(List<String> singletonType) 
 - 
_initializeEnumeratorprivate String _initializeEnumerator(SystemProperty.EnumeratorDefinition enumDef) 
 
- 
 
-