Package org.ametys.cms.model.properties
Class AbstractElementsReferencingProperty<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.AbstractStaticProperty<T,X>
org.ametys.cms.model.properties.AbstractIndexableStaticProperty<T,C,X>
org.ametys.cms.model.properties.AbstractElementsReferencingProperty<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> ReferencingProperty<T,,X> CriterionDefinitionAwareElementDefinition<T,,C, X> IndexationAwareElementDefinition<T,,X> ElementDefinition<T>,ModelItem,PluginAware,Labelable,ModifiableLabelable,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
AbstractMultiValuesProperty,ElementReferencingProperty
public abstract class AbstractElementsReferencingProperty<T,C,X extends ModelAwareDataAwareAmetysObject>
extends AbstractIndexableStaticProperty<T,C,X>
implements ReferencingProperty<T,X>
Abstract implementation for a property referencing
ElementDefinitions-
Field Summary
Fields inherited from class org.ametys.cms.model.properties.AbstractIndexableStaticProperty
_criterionDefinitionHelper, _indexationAwareElementDefinitionHelperFields inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_contextFields 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 ElementDefinition<T> _getReferenceDefinition(String reference) Retrieves the definition of the given referenced elementprotected I18nizableText_parseDescription(Configuration configuration) Parses the description of the propertyprotected I18nizableText_parseLabel(Configuration configuration) Parses the label of the propertyvoidconfigure(Configuration configuration) protected abstract voidconfigureReferences(Configuration configuration) Configures the referencesRetrieves the description.getLabel()Retrieves the label.getName()Get the name.voidUsed to do more initialization, checks...Methods inherited from class org.ametys.cms.model.properties.AbstractIndexableStaticProperty
getCriterionType, getCriterionTypeId, getSolrSortFieldName, serviceMethods inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_getNameConfigurationAttribute, _parseAndSetEnumerator, _parseName, contextualizeMethods 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, getDisableConditions, getItemCheckers, getModel, 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.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
getType, getValue, valueToJSON, valueToSAXMethods inherited from interface org.ametys.cms.model.properties.ReferencingProperty
getReferences
-
Constructor Details
-
AbstractElementsReferencingProperty
public AbstractElementsReferencingProperty()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractStaticProperty<T,X extends ModelAwareDataAwareAmetysObject> - Throws:
ConfigurationException
-
_parseLabel
Description copied from class:AbstractStaticPropertyParses the label of the property- Overrides:
_parseLabelin classAbstractStaticProperty<T,X extends ModelAwareDataAwareAmetysObject> - Parameters:
configuration- the property configuration to use.- Returns:
- the label of the property.
- Throws:
ConfigurationException- if the configuration is not valid.
-
_parseDescription
protected I18nizableText _parseDescription(Configuration configuration) throws ConfigurationException Description copied from class:AbstractStaticPropertyParses the description of the property- Overrides:
_parseDescriptionin classAbstractStaticProperty<T,X extends ModelAwareDataAwareAmetysObject> - Parameters:
configuration- the property configuration to use.- Returns:
- the description of the property.
- Throws:
ConfigurationException- if the configuration is not valid.
-
configureReferences
protected abstract void configureReferences(Configuration configuration) throws ConfigurationException Configures the references- Parameters:
configuration- the property configuration- Throws:
ConfigurationException- if an error occurred
-
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.
-
_getReferenceDefinition
Retrieves the definition of the given referenced element- Parameters:
reference- the reference- Returns:
- the referenced element's definition
-
getName
Description copied from interface:LabelableGet the name.- Specified by:
getNamein interfaceLabelable- Overrides:
getNamein classAbstractModelItem- Returns:
- the name.
-
getLabel
Description copied from interface:LabelableRetrieves the label.- Specified by:
getLabelin interfaceLabelable- Overrides:
getLabelin classAbstractModelItem- Returns:
- the label.
-
getDescription
Description copied from interface:LabelableRetrieves the description.- Specified by:
getDescriptionin interfaceLabelable- Overrides:
getDescriptionin classAbstractModelItem- Returns:
- the description.
-