Package org.ametys.cms.model.properties
Class ContentElementReferencingProperty<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.AbstractElementsReferencingProperty<T,X>
org.ametys.cms.model.properties.ElementReferencingProperty<ContentValue,X>
org.ametys.cms.model.properties.ContentElementReferencingProperty<X>
- Type Parameters:
X
- Type of ametys object supported by this property
- All Implemented Interfaces:
Comparable<ModelItem>
,ContentElementDefinition
,Property<ContentValue,
,X> ReferencingProperty<ContentValue,
,X> ElementDefinition<ContentValue>
,ModelItem
,ModelItemAccessor
,PluginAware
,Labelable
,ModifiableLabelable
,Configurable
public class ContentElementReferencingProperty<X extends ModelAwareDataAwareAmetysObject>
extends ElementReferencingProperty<ContentValue,X>
implements ContentElementDefinition
Property referencing a
ContentElementDefinition
-
Field Summary
Fields inherited from class org.ametys.cms.model.properties.ElementReferencingProperty
_reference
Fields inherited from class org.ametys.cms.model.properties.AbstractProperty
_availableTypesExtensionPoint
Fields inherited from class org.ametys.runtime.model.DefaultElementDefinition
_logger
Fields inherited from class org.ametys.runtime.model.AbstractModelItem
__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 ContentElementDefinition
_getReferenceDefinition
(String reference) Retrieves the definition of the given referenced elementprotected void
configureReferences
(Configuration configuration) Configures the referencesGet the element's content type identifier.Collection<? extends ModelItem>
Retrieves all the model items of this accessorvoid
setContentTypeId
(String contentTypeId) Set the element's content type identifier.Methods inherited from class org.ametys.cms.model.properties.ElementReferencingProperty
_getTypeId, getCriterionEnumerator, getCriterionWidget, getCriterionWidgetParameters, getEnumerator, getReferences, getValue, isMultiple
Methods inherited from class org.ametys.cms.model.properties.AbstractElementsReferencingProperty
_parseI18nizableText, configure, getDescription, getLabel, getName, indexValue, initializeAfterModelItemsInitialization
Methods inherited from class org.ametys.cms.model.properties.AbstractProperty
_getNameConfigurationAttribute, getType, isEditable, setAvailableTypeExtensionPoint, setPluginInfo
Methods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_getDefaultValues, _toJSON, _widgetToJSON, _widgetToSAX, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, getWidget, getWidgetParameters, 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, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, hashCode, 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.runtime.model.ElementDefinition
getCriterionEnumerator, 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.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.model.ModelItemAccessor
getChild, getModelItem, hasModelItem
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
Methods inherited from interface org.ametys.cms.model.properties.Property
getType, setAvailableTypeExtensionPoint, valueToJSON, valueToSAX
-
Constructor Details
-
ContentElementReferencingProperty
public ContentElementReferencingProperty()
-
-
Method Details
-
configureReferences
Description copied from class:AbstractElementsReferencingProperty
Configures the references- Overrides:
configureReferences
in classElementReferencingProperty<ContentValue,
X extends ModelAwareDataAwareAmetysObject> - Parameters:
configuration
- the property configuration- Throws:
ConfigurationException
- if an error occurred
-
getContentTypeId
Description copied from interface:ContentElementDefinition
Get the element's content type identifier.- Specified by:
getContentTypeId
in interfaceContentElementDefinition
- Returns:
- the element's content type identifier.
-
setContentTypeId
Description copied from interface:ContentElementDefinition
Set the element's content type identifier.- Specified by:
setContentTypeId
in interfaceContentElementDefinition
- Parameters:
contentTypeId
- the content type identifier to set.
-
getModelItems
Description copied from interface:ModelItemAccessor
Retrieves all the model items of this accessor- Specified by:
getModelItems
in interfaceContentElementDefinition
- Specified by:
getModelItems
in interfaceModelItemAccessor
- Returns:
- the model items
-
_getReferenceDefinition
Description copied from class:AbstractElementsReferencingProperty
Retrieves the definition of the given referenced element- Overrides:
_getReferenceDefinition
in classAbstractElementsReferencingProperty<ContentValue,
X extends ModelAwareDataAwareAmetysObject> - Parameters:
reference
- the reference- Returns:
- the referenced element's definition
-