Package org.ametys.cms.model
Class DefaultContentElementDefinition
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<ContentValue>
org.ametys.cms.model.DefaultContentElementDefinition
- All Implemented Interfaces:
Comparable<ModelItem>,ContentElementDefinition,ElementDefinition<ContentValue>,ModelItem,ModelItemAccessor,Labelable,ModifiableLabelable
public class DefaultContentElementDefinition
extends DefaultElementDefinition<ContentValue>
implements ContentElementDefinition
Default implementation for element definition of type Content
-
Field Summary
Fields 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 ContentTypeExtensionPointRetrieves theContentTypeExtensionPointprotected ContentTypesHelperRetrieves theContentTypesHelper_toJSON(DefinitionContext context) Converts the model item in a JSON mapGet the element's content type identifier.Collection<? extends ModelItem>Retrieves all the model items of this accessorvoidsetContentTypeId(String contentTypeId) Set the element's content type identifier.voidtoSAX(ContentHandler contentHandler, DefinitionContext context) Generates SAX events for the model itemMethods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_getDefaultValue, _getParsedDefaultValues, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getType, getValidator, getValidatorConfiguration, getWidget, getWidgetParameters, isMultiple, of, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setType, setValidator, setValidatorConfiguration, setWidget, setWidgetParametersMethods inherited from class org.ametys.runtime.model.AbstractModelItem
_shouldJSONBeEmpty, _widgetParameterToSAX, _widgetToSAX, addItemChecker, compareTo, 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
_getParsedDefaultValues, getCriterionEnumerator, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getType, getValidator, getValidatorConfiguration, isEditable, 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, getCriterionWidget, getCriterionWidgetParameters, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSONMethods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItemMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
Constructor Details
-
DefaultContentElementDefinition
public DefaultContentElementDefinition()
-
-
Method Details
-
getContentTypeId
Description copied from interface:ContentElementDefinitionGet the element's content type identifier.- Specified by:
getContentTypeIdin interfaceContentElementDefinition- Returns:
- the element's content type identifier.
-
setContentTypeId
Description copied from interface:ContentElementDefinitionSet the element's content type identifier.- Specified by:
setContentTypeIdin interfaceContentElementDefinition- Parameters:
contentTypeId- the content type identifier to set.
-
getModelItems
Description copied from interface:ModelItemAccessorRetrieves all the model items of this accessor- Specified by:
getModelItemsin interfaceContentElementDefinition- Specified by:
getModelItemsin interfaceModelItemAccessor- Returns:
- the model items
-
_toJSON
Description copied from class:AbstractModelItemConverts the model item in a JSON map- Overrides:
_toJSONin classDefaultElementDefinition<ContentValue>- Parameters:
context- the context of the definition- Returns:
- The model item as a JSON map
- Throws:
ProcessingException- If an error occurs when converting the model item
-
toSAX
Description copied from interface:ModelItemGenerates SAX events for the model item- Specified by:
toSAXin interfaceModelItem- Overrides:
toSAXin classDefaultElementDefinition<ContentValue>- Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventscontext- the context of the definition- Throws:
SAXException- if an error occurs during the SAX events generation
-
_getContentTypesHelper
Retrieves theContentTypesHelper- Returns:
- the
ContentTypesHelper
-
_getContentTypeExtensionPoint
Retrieves theContentTypeExtensionPoint- Returns:
- the
ContentTypeExtensionPoint
-