public class DefaultContentType extends AbstractContentTypeDescriptor implements ContentType, Contextualizable, ThreadSafe, Disposable
It used a configuration file with the following format:
<restrict-to>
[<right type="read|write" id="RIGHT_ID"/>]*
<!-- logical OR between several right id of the same type -->
[<workflow type="read|write" step="3"/>]*
<!-- logical OR between several workflow step of the same type -->
[<cannot type="read|write"/>]*
</restrict-to>
Modifier and Type | Class and Description |
---|---|
protected static interface |
DefaultContentType.AnnotableDefinition
Definition with semantic annotations
|
protected class |
DefaultContentType.MetadataAndRepeaterDefinitionParser
Deprecated.
Use
ContentAttributeDefinitionParser instead |
protected static interface |
DefaultContentType.RestrictedDefinition
Deprecated.
use
RestrictedModelItem instead |
protected static class |
DefaultContentType.RestrictedMetadataDefinition
Deprecated.
Use
AttributeDefinition instead |
protected static class |
DefaultContentType.RestrictedRepeaterDefinition
Deprecated.
Use
ContentRestrictedRepeaterDefinition instead |
protected static class |
DefaultContentType.RestrictedRichTextDefinition
Deprecated.
Use
RichTextAttributeDefinition instead |
_allMetadataSetsForEdition, _allMetadataSetsForView, _category, _contentTypesHelper, _cssFiles, _cTypeEP, _dcProvider, _defaultTitle, _description, _iconDecorator, _iconGlyph, _id, _label, _largeIcon, _mediumIcon, _metadataSetsForEdition, _metadataSetsForView, _pluginName, _smallIcon, _srcResolver, _superTypeIds
TAG_MIXIN, TAG_PRIVATE, TAG_REFERENCE_TABLE, TAG_RENDERABLE_FERENCE_TABLE
Constructor and Description |
---|
DefaultContentType() |
Modifier and Type | Method and Description |
---|---|
protected void |
_addSemanticAnnotations(Configuration indexConf,
MetadataDefinitionHolder holder)
Add semantic annotations as indexing fields to the indexing model.
|
protected void |
_checkAttributeTypes(Configuration metadataConf1,
Configuration metadataConf2)
Check if all metadata's types defined in first configuration are equals to those defined in second configuration
|
protected void |
_checkAttributeTypes(ModelItem item1,
ModelItem item2)
Check if all attribute types defined in first model item are equals to those defined in second model item
|
protected void |
_checkContentAttribute(ModelItem modelItem)
Recursively check that content attributes reference a valid content-type.
|
protected void |
_checkContentAttributes()
Check that content attributes reference a valid content-type.
|
protected void |
_checkContentMutualReferences()
Check content type mutual reference declarations.
|
protected void |
_checkContentMutualReferences(ModelItem modelItem,
int repeaterLevel)
Recursively check a content type mutual reference declarations.
|
protected void |
_checkContentTypeSimplicity(ModelItem modelItem)
Checks the given model item to determine if this content type is multilingual and/or simple
All items of a simple content-type have to be a simple type (string, long, date, ..)
A multilingual content type should contain at least an attribute of type MULTILINGUAL_STRING
|
protected boolean |
_checkMetadataDefinition(MetadataDefinition metadataDefinition)
Deprecated.
Use
_checkContentTypeSimplicity(ModelItem) instead |
protected void |
_checkMetadataTypes(MetadataDefinition metaDef1,
MetadataDefinition metaDef2)
Deprecated.
Use
_checkAttributeTypes(ModelItem, ModelItem) instead |
private void |
_checkTitleAttribute() |
protected void |
_computeIndexingModelReferences()
Browse the indexing model and compute indexing field references.
|
protected void |
_configureAttributeDefinitions(Configuration mainConfig)
Configure attribute definitions
|
protected void |
_configureCustomIndexingFields(Configuration indexConf)
Configure the custom indexing fields.
|
protected void |
_configureCustomMetadataIndexingFields(Configuration indexConf)
Configure the custom metadata indexing fields.
|
protected void |
_configureGlobalValidators(Configuration config)
Configure the global validators for content type
|
protected void |
_configureIndexingModel(Configuration config)
Configure the indexing model
|
protected void |
_configureMetadataIndexingFields(Configuration indexConf)
Configure the metadata indexing fields.
|
protected void |
_configureParentContentType(Configuration mainConfig)
Configures the "parent" content type.
|
protected void |
_configureViews(Configuration mainConfig)
Configure the content type views
|
protected void |
_fillViewItems(Configuration viewConfiguration,
View view,
String[] superTypeIds)
Fill the items of the given view
|
protected void |
_getApplicableAttributes(Configuration config,
Map<String,Configuration> attributeConfigurations,
boolean allowOverride)
Fill a map of the applicable attribute configurations.
|
protected Map<String,Configuration> |
_getApplicableViews(Configuration configuration,
boolean allowOverride)
Compute the applicable views from their configurations.
|
protected Restrictions |
_getRestrictionsForPath(MetadataDefinition metadataDef)
Retrieves the restrictions for a given path.
|
protected void |
_getSemanticAnnotations(MetadataDefinitionHolder holder,
Multimap<SemanticAnnotation,String> annotations,
String prefix)
Get the semantic annotations and their paths from the given metadata definition holder's sub-tree.
|
protected View |
_getViewToInclude(Configuration itemConfiguration,
String viewName,
String[] superTypeIds)
Retrieves the view included by the given configuration
|
protected void |
_parseAllAttributes(Map<String,Configuration> attributeConfigurations)
Parse all attribute configurations.
|
protected void |
_parseAllMetadatas(Map<String,Configuration> metadataConfigurations,
DefaultContentType.MetadataAndRepeaterDefinitionParser defParser)
Deprecated.
use
_parseAllAttributes(Map) instead |
protected void |
_parseDublinCoreAttributes()
Parse DublinCore attributes
|
protected void |
_parseDublinCoreMetadata(DefaultContentType.MetadataAndRepeaterDefinitionParser defParser)
Deprecated.
Use
_parseDublinCoreAttributes() instead |
protected ModelViewItemGroup |
_parseDublinCoreViewItems()
Parses the DublinCore view items.
|
protected MetadataDefinition |
_parseMetadata(Configuration metadataConfiguration,
DefaultContentType.MetadataAndRepeaterDefinitionParser defParser)
Deprecated.
use
_parseModelItem(Configuration, ModelItemGroup) instead |
protected ModelItem |
_parseModelItem(Configuration itemConfiguration,
ModelItemGroup parent)
Parses a model item
|
protected ModelViewItem |
_parseModelViewItem(Configuration itemConfiguration,
ModelViewItemGroup parent)
Parses a model view item
|
protected SimpleViewItemGroup |
_parseSimpleViewItemGroup(Configuration itemConfiguration,
View referenceView,
String[] superTypeIds)
Parses a simple view item group
|
protected Set<String> |
_parseTags(Configuration configuration)
Parse the tags
|
protected View |
_parseView(Configuration viewConfiguration,
String[] superTypeIds)
Parses a view configuration to create a
View object. |
protected Map<String,View> |
_parseViews(Collection<Configuration> viewConfigurations,
String[] superTypeIds)
Parses the own content type's views
|
boolean |
canRead(Content content,
MetadataDefinition metadataDef)
Determine whether a metadata can be read at this time.
|
boolean |
canWrite(Content content,
MetadataDefinition metadataDef)
Determine whether a metadata can be written at this time.
|
void |
configure(Configuration configuration) |
void |
contextualize(Context context) |
void |
dispose() |
Map<String,Object> |
getAdditionalData(Content content)
Get the additional data relative to its
ContentType . |
String |
getFamilyId()
Retrieves the Family Id (for example the extension point)
Each model Id have to be unique in it's family Id
|
List<ContentValidator> |
getGlobalValidators()
Retrieves the potential global validators.
|
protected List<MetadataDefinition> |
getIndexingFieldDefinitions(ContentType initialContentType,
String metadataPath)
Get the list of metadata definitions "traversed" from the initial content type to the given metadata.
|
IndexingModel |
getIndexingModel()
Get the indexing model
|
MetadataDefinition |
getMetadataDefinition(String metadataName)
Retrieves the definition of a given metadata.
|
MetadataDefinition |
getMetadataDefinitionByPath(String metadataPath)
Retrieves the definition of a given metadata by its path.
|
Set<String> |
getMetadataNames()
Retrieves the metadata names.
|
Collection<ModelItem> |
getModelItems()
Retrieves all the model items of this container
|
protected Configuration |
getOverridenConfiguration()
Get the overridden configuration
|
MetadataDefinition |
getParentMetadata()
Gets the metadata holding the "parent" of the contents of this content type.
|
RichTextUpdater |
getRichTextUpdater()
Retrieves the RichText updater
|
String |
getRight()
Get the right needed to create a content of this type.
|
protected Configuration |
getRootConfiguration(Configuration configuration)
Get the root configuration
|
Set<String> |
getTags()
Get the registered tags for this content types
|
View |
getView(String viewName)
Retrieves the view with the given name
|
Set<String> |
getViewNames()
Retrieves the names of all the content type's view
|
boolean |
hasMetadataDefinition(String metadataName)
Determines if the definition of a given metadata exists.
|
boolean |
hasTag(String tagName)
Determines if the content type has the given tag
|
boolean |
isAbstract()
Get whether the content type is abstract, i.e.
|
boolean |
isMixin()
Get whether the content type is a mixin, i.e.
|
boolean |
isMultilingual()
Get whether the content type is multilingual
|
boolean |
isPrivate()
Get whether the content type is private, i.e.
|
boolean |
isReferenceTable()
Get whether the content type is a reference table
|
boolean |
isSimple()
Get whether the content type is simple, i.e.
|
void |
postInitialize()
Called by the extension point when the content type hierarchy has been computed.
|
void |
saxContentTypeAdditionalData(ContentHandler contentHandler,
Content content)
SAX the additional content data linked to its
ContentType
These additional data will be available in content view |
void |
service(ServiceManager manager) |
String |
toString() |
_configureCSSFiles, _configureIcons, _configureLabels, _configureMetadataSets, _configureSuperTypes, _fillMetadataSetDublinCore, _fillMetadataSetElement, _getApplicableMetadataSets, _getDefaultCatalogue, _getIconPath, _parseI18nizableText, _parseI18nizableText, _parseIcon, _parseIcon, _parseIconGlyph, _parseMetadataSet, _parseMetadataSets, getCategory, getCSSFiles, getDefaultTitle, getDescription, getEditionMetadataSetNames, getIconDecorator, getIconGlyph, getId, getLabel, getLargeIcon, getMediumIcon, getMetadataSetForEdition, getMetadataSetForView, getPluginName, getSmallIcon, getSupertypeIds, getViewMetadataSetNames, setPluginInfo
getLogger, setLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCategory, getCSSFiles, getDefaultTitle, getDescription, getEditionMetadataSetNames, getIconDecorator, getIconGlyph, getId, getLabel, getLargeIcon, getMediumIcon, getMetadataSetForEdition, getMetadataSetForView, getPluginName, getSmallIcon, getSupertypeIds, getViewMetadataSetNames
getChild, getModelItem, hasModelItem
protected static final String __GLOBAL_VALIDATOR_ROLE_PREFIX
static Pattern __annotationNamePattern
protected Map<String,MetadataDefinition> _metadata
protected Map<String,ModelItem> _modelItems
protected String _right
protected boolean _abstract
protected String _parentMetadataName
protected ServiceManager _manager
protected Context _cocoonContext
protected ContentRestrictedModelItemHelper _restrictedModelItemHelper
protected RichTextTransformer _richTextTransformer
protected RichTextOutgoingReferencesExtractor _richTextOutgoingReferencesExtractor
protected List<ContentValidator> _globalValidators
protected RichTextUpdater _richTextUpdater
protected IndexingModel _indexingModel
protected HierarchicalReferenceTablesHelper _hierarchicalSimpleContentsHelper
protected ContentAttributeDefinitionParser _attributeDefinitionParser
protected ContentRestrictedCompositeDefinitionParser _compositeDefinitionParser
protected ContentRestrictedRepeaterDefinitionParser _repeaterDefinitionParser
protected DublinCoreAttributeDefinitionParser _dublinCoreAttributeDefinitionParser
@Deprecated private ThreadSafeComponentManager<Validator> _oldValidatorManager
_validatorManager
insteadprivate ThreadSafeComponentManager<Validator> _validatorManager
private ThreadSafeComponentManager<ContentValidator> _globalValidatorsManager
@Deprecated private ThreadSafeComponentManager<Enumerator> _oldEnumeratorManager
_enumeratorManager
insteadprivate ThreadSafeComponentManager<Enumerator> _enumeratorManager
private ThreadSafeComponentManager<CustomIndexingField> _customFieldManager
private ThreadSafeComponentManager<CustomMetadataIndexingField> _customMetadataIndexingFieldManager
private ContentAttributeTypeExtensionPoint _contentAttributeTypeExtensionPoint
private ContentTypeExtensionPoint _contentTypeExtensionPoint
private boolean _isSimple
private boolean _isMultilingual
public DefaultContentType()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractContentTypeDescriptor
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void dispose()
dispose
in interface Disposable
protected Configuration getRootConfiguration(Configuration configuration)
AbstractContentTypeDescriptor
getRootConfiguration
in class AbstractContentTypeDescriptor
configuration
- The configurationprotected Configuration getOverridenConfiguration() throws ConfigurationException
AbstractContentTypeDescriptor
getOverridenConfiguration
in class AbstractContentTypeDescriptor
ConfigurationException
- if an error occurred
TODO NEWATTRIBUTEAPI_CONTENT: Remove this abstract method when AbstractContentTypeDescriptor._configureMetadataSets(Configuration)
is removed. This method will now only be used in DefaultContentType
to configure attributes and viewspublic void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configure
in class AbstractContentTypeDescriptor
ConfigurationException
protected void _configureAttributeDefinitions(Configuration mainConfig) throws ConfigurationException
mainConfig
- The content type configurationConfigurationException
- if an error occurredprotected void _getApplicableAttributes(Configuration config, Map<String,Configuration> attributeConfigurations, boolean allowOverride) throws ConfigurationException
config
- the content type configuration.attributeConfigurations
- the Map of attributes Configuration
, indexed by name.allowOverride
- if true, encountering an attribute which has already been declared (based on its name) will replace it. Otherwise, an exception will be thrown.ConfigurationException
- if an error occurs.protected void _checkAttributeTypes(Configuration metadataConf1, Configuration metadataConf2) throws ConfigurationException
metadataConf1
- The first configuration to comparemetadataConf2
- The second configuration to compareConfigurationException
- if the types are not equalsprotected void _parseAllAttributes(Map<String,Configuration> attributeConfigurations) throws ConfigurationException
attributeConfigurations
- the attribute configurations.ConfigurationException
- if the configuration is invalid.protected ModelItem _parseModelItem(Configuration itemConfiguration, ModelItemGroup parent) throws ConfigurationException
itemConfiguration
- configuration of the model item to parseparent
- the parent of the model item to parse. Can be null
if the item has no parent.ConfigurationException
- if an error occurs while the model item is parsedprotected void _checkAttributeTypes(ModelItem item1, ModelItem item2) throws ConfigurationException
item1
- The first item to compareitem2
- The second item to compareConfigurationException
- if the types are not equalsprotected void _checkContentTypeSimplicity(ModelItem modelItem)
modelItem
- The model item to checkprotected void _parseDublinCoreAttributes() throws ConfigurationException
ConfigurationException
- if the configuration is invalid@Deprecated protected void _parseAllMetadatas(Map<String,Configuration> metadataConfigurations, DefaultContentType.MetadataAndRepeaterDefinitionParser defParser) throws ConfigurationException
_parseAllAttributes(Map)
insteadmetadataConfigurations
- the metadata configurations.defParser
- the metadata definition parser.ConfigurationException
- if the configuration is invalid.@Deprecated protected MetadataDefinition _parseMetadata(Configuration metadataConfiguration, DefaultContentType.MetadataAndRepeaterDefinitionParser defParser) throws ConfigurationException
_parseModelItem(Configuration, ModelItemGroup)
insteadmetadataConfiguration
- the metadata configuration.defParser
- the metadata definition parser.ConfigurationException
- if the configuration is invalid@Deprecated protected void _checkMetadataTypes(MetadataDefinition metaDef1, MetadataDefinition metaDef2) throws ConfigurationException
_checkAttributeTypes(ModelItem, ModelItem)
insteadmetaDef1
- The first metadata definition to comparemetaDef2
- The second metadata definition to compareConfigurationException
- if the types are not equals@Deprecated protected boolean _checkMetadataDefinition(MetadataDefinition metadataDefinition)
_checkContentTypeSimplicity(ModelItem)
insteadmetadataDefinition
- The metadata definition@Deprecated protected void _parseDublinCoreMetadata(DefaultContentType.MetadataAndRepeaterDefinitionParser defParser) throws ConfigurationException
_parseDublinCoreAttributes()
insteaddefParser
- The parser definitionConfigurationException
- if the configuration is invalidprotected void _configureParentContentType(Configuration mainConfig) throws ConfigurationException
AbstractContentTypeDescriptor._configureSuperTypes(Configuration)
)mainConfig
- The main configurationConfigurationException
- if an error occured
TODO NEWATTRIBUTEAPI_CONTENT: Adapt this method when all attribute types are managed with the new APIprotected void _configureViews(Configuration mainConfig) throws ConfigurationException
mainConfig
- The content type configurationConfigurationException
- if an error occurredprotected Map<String,Configuration> _getApplicableViews(Configuration configuration, boolean allowOverride) throws ConfigurationException
configuration
- The content type configurationallowOverride
- if true
, encountering a view which has already been declared (based on its name) will replace it. Otherwise, an exception will be thrown.ConfigurationException
- if the configuration is invalidprotected Map<String,View> _parseViews(Collection<Configuration> viewConfigurations, String[] superTypeIds) throws ConfigurationException
viewConfigurations
- the configuration that contains the viewssuperTypeIds
- the super content-types identifiersMap
with a boolean that determines if the view is internal or notConfigurationException
- if the configuration is invalidprotected View _parseView(Configuration viewConfiguration, String[] superTypeIds) throws ConfigurationException
View
object.viewConfiguration
- the configuration of the view to parsesuperTypeIds
- the super types identifiersConfigurationException
- if the configuration is not valid.protected void _fillViewItems(Configuration viewConfiguration, View view, String[] superTypeIds) throws ConfigurationException
viewConfiguration
- the configuration of the view to fillview
- the view to fillsuperTypeIds
- the super types identifiersConfigurationException
- if the configuration is not valid.protected ModelViewItem _parseModelViewItem(Configuration itemConfiguration, ModelViewItemGroup parent) throws ConfigurationException
itemConfiguration
- configuration of the model view itemparent
- parent of the model view item. Can be null
if the item has no model item parentConfigurationException
- if the configuration is not valid.protected SimpleViewItemGroup _parseSimpleViewItemGroup(Configuration itemConfiguration, View referenceView, String[] superTypeIds) throws ConfigurationException
itemConfiguration
- configuration of the simple view item groupreferenceView
- the reference view for includessuperTypeIds
- the super types identifiersConfigurationException
- if the configuration is not valid.protected View _getViewToInclude(Configuration itemConfiguration, String viewName, String[] superTypeIds) throws ConfigurationException
itemConfiguration
- configuration of the item that includes the viewviewName
- name of the view containing the item. (the item can be the view itself or a simple view item group inside the view)superTypeIds
- the super types identifiersConfigurationException
- if the configuration is not validprotected ModelViewItemGroup _parseDublinCoreViewItems() throws ConfigurationException
ConfigurationException
- if the configuration is not valid.protected void _configureGlobalValidators(Configuration config) throws ConfigurationException
config
- The content type configurationConfigurationException
- if an error occursprotected void _configureIndexingModel(Configuration config) throws ConfigurationException
config
- The main configurationConfigurationException
- if an error occurredprotected void _addSemanticAnnotations(Configuration indexConf, MetadataDefinitionHolder holder)
indexConf
- the indexing model configuration.holder
- the metadata holder (ContentType or MetadataDefinition) to scan for annotable metadata.protected void _getSemanticAnnotations(MetadataDefinitionHolder holder, Multimap<SemanticAnnotation,String> annotations, String prefix)
holder
- The current metadata definition holder.annotations
- The map of semantic annotations and the corresponding metadata paths.prefix
- The current prefix in the metadata tree (with a trailing slash, if applicable).protected void _configureMetadataIndexingFields(Configuration indexConf) throws ConfigurationException
indexConf
- the indexing model configuration.ConfigurationException
- if an error occurs.protected void _configureCustomIndexingFields(Configuration indexConf) throws ConfigurationException
indexConf
- the indexing model configuration.ConfigurationException
- if an error occurs.protected void _configureCustomMetadataIndexingFields(Configuration indexConf) throws ConfigurationException
indexConf
- the indexing model configuration.ConfigurationException
- if an error occurs.protected Set<String> _parseTags(Configuration configuration) throws ConfigurationException
configuration
- the configuration to useConfigurationException
- if the configuration is not valid.public void postInitialize() throws Exception
ContentType
postInitialize
in interface ContentType
Exception
- if an error occurs of if an additional check fails.private void _checkTitleAttribute() throws ConfigurationException
ConfigurationException
protected void _checkContentAttributes() throws ConfigurationException
ConfigurationException
- if a content attributes references an invalid or non-existing content type.protected void _checkContentAttribute(ModelItem modelItem) throws ConfigurationException
modelItem
- the attribute definition.ConfigurationException
- if a content attribute references an invalid or non-existing content type.protected void _checkContentMutualReferences() throws ConfigurationException
ConfigurationException
- if there is a problem with mutual reference declarations.protected void _checkContentMutualReferences(ModelItem modelItem, int repeaterLevel) throws ConfigurationException
modelItem
- the model item.repeaterLevel
- the current nested level of repeaters, 0 if the current attribute isn't in a repeater.ConfigurationException
- if there is a problem with mutual reference declarations.protected void _computeIndexingModelReferences()
protected List<MetadataDefinition> getIndexingFieldDefinitions(ContentType initialContentType, String metadataPath)
initialContentType
- the initial content type.metadataPath
- the compound metadata path.public List<ContentValidator> getGlobalValidators()
ContentType
getGlobalValidators
in interface ContentType
public RichTextUpdater getRichTextUpdater()
ContentType
getRichTextUpdater
in interface ContentType
null
if none.public Set<String> getMetadataNames()
MetadataDefinitionHolder
getMetadataNames
in interface MetadataDefinitionHolder
public MetadataDefinition getMetadataDefinition(String metadataName)
MetadataDefinitionHolder
getMetadataDefinition
in interface MetadataDefinitionHolder
metadataName
- the metadata name.public boolean hasMetadataDefinition(String metadataName)
ContentType
hasMetadataDefinition
in interface ContentType
metadataName
- the metadata name.true
if the metadata definition existspublic MetadataDefinition getMetadataDefinitionByPath(String metadataPath)
ContentType
getMetadataDefinitionByPath
in interface ContentType
metadataPath
- the metadata path, separated by '/'null
if not foundpublic IndexingModel getIndexingModel()
ContentType
getIndexingModel
in interface ContentType
public boolean canRead(Content content, MetadataDefinition metadataDef) throws AmetysRepositoryException
ContentType
canRead
in interface ContentType
content
- The content where metadata is to be read on. Can be null, on content creation.metadataDef
- the metadata definitiontrue
if the current user is allowed to read the metadata of this content.AmetysRepositoryException
- if an error occurs while accessing the content.public boolean canWrite(Content content, MetadataDefinition metadataDef) throws AmetysRepositoryException
ContentType
canWrite
in interface ContentType
content
- The content where metadata is to be written on. Can be null, on content creation.metadataDef
- the metadata definitiontrue
if the current user is allowed to write the metadata of this content.AmetysRepositoryException
- if an error occurs while accessing the content.public Set<String> getTags()
ContentType
getTags
in interface ContentType
public boolean hasTag(String tagName)
ContentType
hasTag
in interface ContentType
tagName
- The tag namepublic boolean isPrivate()
ContentType
isPrivate
in interface ContentType
public boolean isAbstract()
ContentType
isAbstract
in interface ContentType
public boolean isSimple()
ContentType
isSimple
in interface ContentType
public boolean isReferenceTable()
ContentType
isReferenceTable
in interface ContentType
public boolean isMultilingual()
ContentType
isMultilingual
in interface ContentType
public boolean isMixin()
ContentType
isMixin
in interface ContentType
public String getRight()
ContentType
getRight
in interface ContentType
public void saxContentTypeAdditionalData(ContentHandler contentHandler, Content content) throws AmetysRepositoryException, SAXException
ContentType
ContentType
These additional data will be available in content viewsaxContentTypeAdditionalData
in interface ContentType
contentHandler
- The handler to SAX intocontent
- The contentAmetysRepositoryException
- if an error occurs while accessing the content.SAXException
- if an error occurs while SAXingpublic Map<String,Object> getAdditionalData(Content content)
ContentType
ContentType
.
These additional data are delivered to client side.getAdditionalData
in interface ContentType
content
- The contentprotected Restrictions _getRestrictionsForPath(MetadataDefinition metadataDef)
metadataDef
- the metadata definition.null
if not found.public MetadataDefinition getParentMetadata()
ContentType
MetadataType.CONTENT
and must reference a private and simple content type.getParentMetadata
in interface ContentType
public Collection<ModelItem> getModelItems()
ModelItemContainer
getModelItems
in interface ModelItemContainer
public Set<String> getViewNames()
ContentType
getViewNames
in interface ContentType
public View getView(String viewName)
ContentType
getView
in interface ContentType
viewName
- the name of the view to retrievepublic String getFamilyId()
Model
getFamilyId
in interface Model