Package org.ametys.cms.model.properties
Class AbstractContentProperty<X extends ModelAwareDataAwareAmetysObject>
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<ContentValue>
org.ametys.cms.model.properties.AbstractProperty<ContentValue,X>
org.ametys.cms.model.properties.AbstractContentProperty<X>
- Type Parameters:
X
- type of ametys object supported by this property
- All Implemented Interfaces:
Comparable<ModelItem>
,ContentElementDefinition
,Property<ContentValue,
,X> ElementDefinition<ContentValue>
,ModelItem
,ModelItemAccessor
,PluginAware
,Labelable
,ModifiableLabelable
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
ComputedStepHolderProperty
,OrgUnitAncestorProperty
,OverridenThematicsProperty
,ParentProgramsProperty
,ParentSubProgramsProperty
,ProgramSkillsProperty
,SelfAndParentOrgUnitsProperty
public abstract class AbstractContentProperty<X extends ModelAwareDataAwareAmetysObject>
extends AbstractProperty<ContentValue,X>
implements ContentElementDefinition
Abstract class for content property
-
Field Summary
Fields inherited from class org.ametys.cms.model.properties.AbstractProperty
_availableTypesExtensionPoint, _context, _manager
Fields 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 abstract Set
<? extends ModifiableContent> _getLinkedContents
(X dataHolder) Get the linked contents to index._toJSON
(DefinitionContext context) Converts the model item in a JSON mapCollection
<? extends ModelItem> Retrieves all the model items of this accessorprotected String
Retrieves the id of the property's typeGet the property's valuevoid
service
(ServiceManager manager) void
setContentTypeId
(String contentTypeId) Set the element's content type identifier.void
toSAX
(ContentHandler contentHandler, DefinitionContext context) Generates SAX events for the model itemMethods inherited from class org.ametys.cms.model.properties.AbstractProperty
_getNameConfigurationAttribute, _parseAndSetEnumerator, _parseDescription, _parseLabel, _parseName, configure, contextualize, getType, isEditable, setAvailableTypeExtensionPoint, setPluginInfo
Methods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _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
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.model.ContentElementDefinition
getContentTypeId
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.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
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
initializeAfterModelItemsInitialization, valueToJSON, valueToSAX
-
Constructor Details
-
AbstractContentProperty
public AbstractContentProperty()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractProperty<ContentValue,
X extends ModelAwareDataAwareAmetysObject> - Throws:
ServiceException
-
getTypeId
Description copied from class:AbstractProperty
Retrieves the id of the property's type- Specified by:
getTypeId
in classAbstractProperty<ContentValue,
X extends ModelAwareDataAwareAmetysObject> - Returns:
- the id of the property's type
-
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
-
_toJSON
Description copied from class:AbstractModelItem
Converts the model item in a JSON map- Overrides:
_toJSON
in classDefaultElementDefinition<ContentValue>
- Parameters:
context
- the context of the definition- Returns:
- The model item as a JSON map
-
toSAX
Description copied from interface:ModelItem
Generates SAX events for the model item- Specified by:
toSAX
in interfaceModelItem
- Overrides:
toSAX
in classDefaultElementDefinition<ContentValue>
- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventscontext
- the context of the definition- Throws:
SAXException
- if an error occurs during the SAX events generation
-
getValue
Description copied from interface:Property
Get the property's value- Specified by:
getValue
in interfaceProperty<ContentValue,
X extends ModelAwareDataAwareAmetysObject> - Parameters:
dataHolder
- the ametysObject containing the property- Returns:
- the values to index.
-
_getLinkedContents
Get the linked contents to index.- Parameters:
dataHolder
- The data holder- Returns:
- The linked contents
-