Package org.ametys.cms.search.model.impl
Class ContentSearchModelCriterionDefinition
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<ContentValue>
org.ametys.cms.search.model.impl.AbstractCriterionDefinition<ContentValue>
org.ametys.cms.search.model.impl.DefaultSearchModelCriterionDefinition<ContentValue>
org.ametys.cms.search.model.impl.ContentSearchModelCriterionDefinition
- All Implemented Interfaces:
Comparable<ModelItem>,ContentElementDefinition,CriterionDefinition<ContentValue>,SearchModelCriterionDefinition<ContentValue>,ElementDefinition<ContentValue>,ModelItem,ModelItemAccessor,Labelable,ModifiableLabelable
public class ContentSearchModelCriterionDefinition
extends DefaultSearchModelCriterionDefinition<ContentValue>
implements ContentElementDefinition
Implementation of
SearchModelCriterionDefinition for data of type content.-
Field Summary
FieldsFields inherited from class org.ametys.cms.search.model.impl.DefaultSearchModelCriterionDefinition
_operatorFields inherited from class org.ametys.cms.search.model.impl.AbstractCriterionDefinition
_criterionDefinitionHelper, _joinedPaths, _multipleOperandOperator, _solrFacetFieldNameFields inherited from class org.ametys.runtime.model.DefaultElementDefinition
_loggerFields inherited from class org.ametys.runtime.model.AbstractModelItem
__context, __serviceManagerFields inherited from interface org.ametys.runtime.model.ElementDefinition
CONFIG_DEFAULT_VALUE_TYPEFields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentTypeExtensionPointRetrieves theContentTypeExtensionPointprotected ContentTypesHelperRetrieves theContentTypesHelperprotected ModelItemTypeExtensionPointRetrieves theModelItemTypeExtensionPointfor available criterion types_toJSON(DefinitionContext context) Converts the model item in a JSON mapvoidcopyTo(SearchModelCriterionDefinition<ContentValue> criterion, Map<String, Object> contextualParameters) Copy the current criterion definition in the given one.Get the element's content type identifier.Collection<? extends ModelItem> Retrieves all the model items of this accessorgetType()Retrieves the type.voidsetContentTypeId(String contentTypeId) Set the element's content type identifier.voidtoSAX(ContentHandler contentHandler, DefinitionContext context) Generates SAX events for the model itemMethods inherited from class org.ametys.cms.search.model.impl.DefaultSearchModelCriterionDefinition
_getDefaultOperator, getModel, getOperator, getQuery, setMultipleOperandOperator, setOperatorMethods inherited from class org.ametys.cms.search.model.impl.AbstractCriterionDefinition
_getCriterionDefinitionHelper, _getDefaultWidget, _getDefaultWidgetParameters, convertQueryValue, getJoinedPaths, getMultipleOperandOperator, getQueryContext, getSolrFacetFieldName, getWidget, getWidgetParameters, setJoinedPaths, setSolrFacetFieldNameMethods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _getSimpleDefaultValue, _widgetToJSON, _widgetToSAX, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, isMultiple, of, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setType, setValidator, setValidatorConfiguration, setWidget, setWidgetParametersMethods inherited from class org.ametys.runtime.model.AbstractModelItem
_getModelItemHelper, _shouldJSONBeEmpty, _widgetParameterToSAX, addItemChecker, compareTo, disableConditionsToJSON, equals, getDescription, getDisableConditions, getItemCheckers, getLabel, getName, getParent, getPath, getPluginName, hashCode, setContext, setDescription, setDisableConditions, setLabel, setModel, setName, setParent, setPluginName, setServiceManager, toJSON, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.ametys.cms.search.model.CriterionDefinition
convertQueryValue, getJoinedPaths, getQuery, getQuery, getSolrFacetFieldNameMethods inherited from interface org.ametys.runtime.model.ElementDefinition
getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, isEditable, isMultiple, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setValidator, setValidatorConfigurationMethods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getNameMethods inherited from interface org.ametys.runtime.model.ModelItem
addItemChecker, getDisableConditions, getItemCheckers, getParent, getPath, getPluginName, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSONMethods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItemMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
Field Details
-
_contentTypeId
The criterion's content type identifier.
-
-
Constructor Details
-
ContentSearchModelCriterionDefinition
-
-
Method Details
-
getContentTypeId
Description copied from interface:ContentElementDefinitionGet the element's content type identifier.- Specified by:
getContentTypeIdin interfaceContentElementDefinition- Returns:
- the element's content type identifier.
-
setContentTypeId
Description copied from interface:ContentElementDefinitionSet the element's content type identifier.- Specified by:
setContentTypeIdin interfaceContentElementDefinition- Parameters:
contentTypeId- the content type identifier to set.
-
getModelItems
Description copied from interface:ModelItemAccessorRetrieves all the model items of this accessor- Specified by:
getModelItemsin interfaceContentElementDefinition- Specified by:
getModelItemsin interfaceModelItemAccessor- Returns:
- the model items
-
_toJSON
Description copied from class:AbstractModelItemConverts the model item in a JSON map- Overrides:
_toJSONin classDefaultSearchModelCriterionDefinition<ContentValue>- Parameters:
context- the context of the definition- Returns:
- The model item as a JSON map
-
toSAX
Description copied from interface:ModelItemGenerates SAX events for the model item- Specified by:
toSAXin interfaceModelItem- Overrides:
toSAXin classDefaultSearchModelCriterionDefinition<ContentValue>- Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventscontext- the context of the definition- Throws:
SAXException- if an error occurs during the SAX events generation
-
copyTo
public void copyTo(SearchModelCriterionDefinition<ContentValue> criterion, Map<String, Object> contextualParameters) Description copied from interface:SearchModelCriterionDefinitionCopy the current criterion definition in the given one.- Specified by:
copyToin interfaceSearchModelCriterionDefinition<ContentValue>- Overrides:
copyToin classDefaultSearchModelCriterionDefinition<ContentValue>- Parameters:
criterion- the copycontextualParameters- the contextual parameters
-
getType
Description copied from interface:ModelItemRetrieves the type.- Specified by:
getTypein interfaceCriterionDefinition<ContentValue>- Specified by:
getTypein interfaceElementDefinition<ContentValue>- Specified by:
getTypein interfaceModelItem- Overrides:
getTypein classAbstractCriterionDefinition<ContentValue>- Returns:
- the type.
-
_getContentTypesHelper
Retrieves theContentTypesHelper- Returns:
- the
ContentTypesHelper
-
_getContentTypeExtensionPoint
Retrieves theContentTypeExtensionPoint- Returns:
- the
ContentTypeExtensionPoint
-
_getCriterionTypeExtensionPoint
Retrieves theModelItemTypeExtensionPointfor available criterion types- Returns:
- the
ModelItemTypeExtensionPointfor available criterion types
-