Package org.ametys.cms.model.properties
Class AbstractIndexableProperty<T,C,X extends ModelAwareDataAwareAmetysObject>
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<T>
org.ametys.cms.model.properties.AbstractProperty<T,X>
org.ametys.cms.model.properties.AbstractIndexableProperty<T,C,X>
- Type Parameters:
T
- type of the property valuesC
- type of criterionX
- type of ametys object supported by this property
- All Implemented Interfaces:
Comparable<ModelItem>
,Property<T,
,X> CriterionDefinitionAwareElementDefinition<T,
,C, X> IndexationAwareElementDefinition<T,
,X> ElementDefinition<T>
,ModelItem
,PluginAware
,Labelable
,ModifiableLabelable
- Direct Known Subclasses:
TrashElementSiteProperty
public abstract class AbstractIndexableProperty<T,C,X extends ModelAwareDataAwareAmetysObject>
extends AbstractProperty<T,X>
implements CriterionDefinitionAwareElementDefinition<T,C,X>
Abstract class for indexable and searchable property
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CriterionDefinitionHelper
The criterion definition helperprotected IndexableElementType
The type to use when rendering the element as a criterionprotected IndexationAwareElementDefinitionHelper
The indexable aware element definition helperFields inherited from class org.ametys.runtime.model.DefaultElementDefinition
_logger
Fields inherited from class org.ametys.runtime.model.AbstractModelItem
__context, __serviceManager
Fields inherited from interface org.ametys.runtime.model.ElementDefinition
CONFIG_DEFAULT_VALUE_TYPE
Fields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CriterionDefinitionHelper
Retrieves theCriterionDefinitionHelper
protected IndexationAwareElementDefinitionHelper
Retrieves theCriterionDefinitionHelper
Get the type to use when rendering the element as a criterionprotected String
Get the identifier of type to use when rendering the property as a criterionRetrieves the name of the element's solr sort fieldvoid
Used to do more initialization, checks...Methods inherited from class org.ametys.cms.model.properties.AbstractProperty
getType, getTypeId, isEditable, setPluginInfo
Methods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _getSimpleDefaultValue, _toJSON, _widgetToJSON, _widgetToSAX, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, getWidget, getWidgetParameters, isMultiple, of, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setType, setValidator, setValidatorConfiguration, setWidget, setWidgetParameters, toSAX
Methods inherited from class org.ametys.runtime.model.AbstractModelItem
_getModelItemHelper, _shouldJSONBeEmpty, _widgetParameterToSAX, addItemChecker, compareTo, disableConditionsToJSON, equals, getDescription, getDisableConditions, getItemCheckers, getLabel, getModel, getName, getParent, getPath, getPluginName, hashCode, setContext, setDescription, setDisableConditions, setLabel, setModel, setName, setParent, setPluginName, setServiceManager, toJSON, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.ametys.cms.search.model.CriterionDefinitionAwareElementDefinition
convertQueryValue, getDefaultCriterionEnumerator, getDefaultCriterionOperator, getDefaultCriterionWidget, getDefaultCriterionWidgetParameters, getQuery
Methods 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, setValidatorConfiguration
Methods inherited from interface org.ametys.cms.search.model.IndexationAwareElementDefinition
getSolrFacetFieldName, getSolrFieldName, getType, getValue, indexValue, isFacetable, isSortable
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
Methods inherited from interface org.ametys.runtime.model.ModelItem
addItemChecker, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSON, toSAX
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
Methods inherited from interface org.ametys.cms.model.properties.Property
getValue, valueToJSON, valueToSAX
-
Field Details
-
_criterionDefinitionHelper
The criterion definition helper -
_indexationAwareElementDefinitionHelper
The indexable aware element definition helper -
_criterionType
The type to use when rendering the element as a criterion
-
-
Constructor Details
-
AbstractIndexableProperty
public AbstractIndexableProperty()
-
-
Method Details
-
init
Description copied from interface:Property
Used to do more initialization, checks... needing the role of extension point containing the types available for this property Called byModel
parsing when the model items of all models have been initialized.- Specified by:
init
in interfaceProperty<T,
C> - Overrides:
init
in classAbstractProperty<T,
X extends ModelAwareDataAwareAmetysObject> - Parameters:
availableTypesRole
- the extension point's role for available types- Throws:
Exception
- if an error occurs or if an additional check fails.
-
getSolrSortFieldName
Description copied from interface:IndexationAwareElementDefinition
Retrieves the name of the element's solr sort field- Specified by:
getSolrSortFieldName
in interfaceIndexationAwareElementDefinition<T,
C> - Returns:
- the name of the element's solr sort field
-
getCriterionType
Description copied from interface:CriterionDefinitionAwareElementDefinition
Get the type to use when rendering the element as a criterion- Specified by:
getCriterionType
in interfaceCriterionDefinitionAwareElementDefinition<T,
C, X extends ModelAwareDataAwareAmetysObject> - Returns:
- the type to use for a criterion
-
getCriterionTypeId
Get the identifier of type to use when rendering the property as a criterion- Returns:
- the identifier of type to use for a criterion
-
_getCriterionDefinitionHelper
Retrieves theCriterionDefinitionHelper
- Returns:
- the
CriterionDefinitionHelper
-
_getIndexationAwareElementDefinitionHelper
Retrieves theCriterionDefinitionHelper
- Returns:
- the
CriterionDefinitionHelper
-