Package org.ametys.web.search.model.impl
Class ContentPrivacySearchUICriterion
java.lang.Object
org.ametys.runtime.parameter.Parameter<MetadataType>
org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
org.ametys.cms.search.ui.model.impl.AbstractCustomSearchUICriterion
org.ametys.web.search.model.impl.ContentPrivacySearchUICriterion
- All Implemented Interfaces:
Field
,SearchCriterion
,SearchUICriterion
,LogEnabled
,Disposable
,Configurable
,Contextualizable
,Serviceable
Custom boolean
It's generally used as a hidden search criterion to force the "true" or "false" value.
SearchUICriterion
representing whether to take content
access restrictions ("content privacy") into account.It's generally used as a hidden search criterion to force the "true" or "false" value.
-
Field Summary
Modifier and TypeFieldDescriptionprotected JSONUtils
The JSON utils.protected String
The site criterion ID.protected SiteManager
The site manager.Fields inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUICriterion
_contentHelper, _contentTypeExtensionPoint, _context, _enumeratorManager, _logger, _manager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) 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
Determines if the column value is multipleboolean
Test if the SearchCriterion is sortable.void
service
(ServiceManager manager) Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractCustomSearchUICriterion
configureId
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, dispose, getChangeClassName, getContentTypeId, getGroup, getInitClassName, getSearchField, getSubmitClassName, isHidden, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setLogger, 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
getDescription, getId, getLabel, getQuery, isFacetable
Methods inherited from interface org.ametys.cms.search.ui.model.SearchUICriterion
getDefaultValue, getValidator, getWidget, getWidgetParameters
-
Field Details
-
_siteManager
The site manager. -
_jsonUtils
The JSON utils. -
_siteCriterionId
The site criterion ID.
-
-
Constructor Details
-
ContentPrivacySearchUICriterion
public ContentPrivacySearchUICriterion()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSearchUICriterion
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractSearchUICriterion
- Throws:
ConfigurationException
-
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
-
isSortable
Description copied from interface:SearchCriterion
Test if the SearchCriterion is sortable.- Returns:
true
if the criterion is sortable, false otherwise.
-
getOperator
Description copied from interface:SearchCriterion
Get the criterion Operator.- Returns:
- the criterion Operator.
-
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.
-
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.
-