Package org.ametys.cms.model.properties
Class AbstractProperty<T,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>
- Type Parameters:
T- type of the property valuesX- type of ametys object supported by this property
- All Implemented Interfaces:
Comparable<ModelItem>,Property<T,,X> ElementDefinition<T>,ModelItem,PluginAware,Labelable,ModifiableLabelable,Configurable
- Direct Known Subclasses:
AbstractContentProperty,AbstractElementsReferencingProperty,AbstractSystemProperty,ContainerMCCWorkflowStatusProperty,DegreeOrderProperty,DegreeTypeProperty,MemberProjectProperty,ODFPrimaryContentTypeProperty,PinProperty,SharedProperty,SubProgramParentProgramProperty
public abstract class AbstractProperty<T,X extends ModelAwareDataAwareAmetysObject>
extends DefaultElementDefinition<T>
implements Property<T,X>, Configurable, PluginAware
Abstract class for single property
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExtensionPoint<ModelItemType>extension point containing the types available for this propertyFields inherited from class org.ametys.runtime.model.DefaultElementDefinition
_loggerFields inherited from class org.ametys.runtime.model.AbstractModelItem
__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 StringRetrieves the name of the configuration attribute that contains the name of the propertyprotected abstract StringRetrieves the id of the property's typeprotected I18nizableText_parseI18nizableText(Configuration config, String pluginName, String name) Parse an i18n text.voidconfigure(Configuration configuration) getType()Retrieves the type.booleanDetermines if the definition is editable, i.e.voidsetAvailableTypeExtensionPoint(ExtensionPoint<ModelItemType> availableTypesExtensionPoint) Set the extension point containing the types available for this propertyvoidsetPluginInfo(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_getDefaultValues, _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, 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.runtime.model.ElementDefinition
getCriterionEnumerator, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, 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, 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
getCriterionWidget, getCriterionWidgetParameters, getValue, indexValue, initializeAfterModelItemsInitialization, valueToJSON, valueToSAX
-
Field Details
-
_availableTypesExtensionPoint
extension point containing the types available for this property
-
-
Constructor Details
-
AbstractProperty
public AbstractProperty()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
_getNameConfigurationAttribute
Retrieves the name of the configuration attribute that contains the name of the property- Returns:
- the name of the configuration attribute that contains the name of the property
-
_parseI18nizableText
protected I18nizableText _parseI18nizableText(Configuration config, String pluginName, String name) throws ConfigurationException Parse an i18n text.- Parameters:
config- the configuration to use.pluginName- the current plugin name.name- the child name.- Returns:
- the i18n text.
- Throws:
ConfigurationException- if the configuration is not valid.
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
isEditable
Description copied from interface:ElementDefinitionDetermines if the definition is editable, i.e. if it can be part of a view used for edition- Specified by:
isEditablein interfaceElementDefinition<T>- Returns:
trueif the definition is editable,falseotherwise
-
setAvailableTypeExtensionPoint
public void setAvailableTypeExtensionPoint(ExtensionPoint<ModelItemType> availableTypesExtensionPoint) Description copied from interface:PropertySet the extension point containing the types available for this property- Specified by:
setAvailableTypeExtensionPointin interfaceProperty<T,X extends ModelAwareDataAwareAmetysObject> - Parameters:
availableTypesExtensionPoint- the extension point to set
-
getType
Description copied from interface:ModelItemRetrieves the type.- Specified by:
getTypein interfaceElementDefinition<T>- Specified by:
getTypein interfaceModelItem- Specified by:
getTypein interfaceProperty<T,X extends ModelAwareDataAwareAmetysObject> - Overrides:
getTypein classDefaultElementDefinition<T>- Returns:
- the type.
-
_getTypeId
Retrieves the id of the property's type- Returns:
- the id of the property's type
-