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 CriterionDefinitionHelperThe criterion definition helperprotected IndexableElementTypeThe type to use when rendering the element as a criterionprotected IndexationAwareElementDefinitionHelperThe indexable aware element definition helperFields 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 CriterionDefinitionHelperRetrieves theCriterionDefinitionHelperprotected IndexationAwareElementDefinitionHelperRetrieves theCriterionDefinitionHelperGet the type to use when rendering the element as a criterionprotected StringGet the identifier of type to use when rendering the property as a criterionRetrieves the name of the element's solr sort fieldvoidUsed to do more initialization, checks...Methods inherited from class org.ametys.cms.model.properties.AbstractProperty
getType, getTypeId, isEditable, setPluginInfoMethods 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, toSAXMethods 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, 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.CriterionDefinitionAwareElementDefinition
convertQueryValue, getDefaultCriterionEnumerator, getDefaultCriterionOperator, getDefaultCriterionWidget, getDefaultCriterionWidgetParameters, getQueryMethods 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.cms.search.model.IndexationAwareElementDefinition
getSolrFacetFieldName, getSolrFieldName, getType, getValue, indexValue, isFacetable, isSortableMethods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getNameMethods 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, toSAXMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setNameMethods 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:PropertyUsed to do more initialization, checks... needing the role of extension point containing the types available for this property Called byModelparsing when the model items of all models have been initialized.- Specified by:
initin interfaceProperty<T,C> - Overrides:
initin 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:IndexationAwareElementDefinitionRetrieves the name of the element's solr sort field- Specified by:
getSolrSortFieldNamein interfaceIndexationAwareElementDefinition<T,C> - Returns:
- the name of the element's solr sort field
-
getCriterionType
Description copied from interface:CriterionDefinitionAwareElementDefinitionGet the type to use when rendering the element as a criterion- Specified by:
getCriterionTypein 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
-