public interface ContentType extends ContentTypeDescriptor, MetadataDefinitionHolder
Modifier and Type | Field and Description |
---|---|
static String |
TAG_MIXIN
Tag for simple content type
|
static String |
TAG_PRIVATE
Tag for private content type
|
static String |
TAG_SIMPLE
Tag for simple content type
|
Modifier and Type | Method and Description |
---|---|
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.
|
Map<String,Object> |
getAdditionalData(Content content)
Get the additional data relative to its
ContentType . |
List<ContentValidator> |
getGlobalValidators()
Retrieves the potential global validators.
|
IndexingModel |
getIndexingModel()
Get the indexing model
|
MetadataDefinition |
getMetadataDefinitionByPath(String metadataPath)
Retrieves the definition of a given metadata by its path.
|
RichTextUpdater |
getRichTextUpdater()
Retrieves the RichText updater
|
String |
getRight()
Get the right needed to create a content of this type.
|
Set<String> |
getTags()
Get the registered tags for this content types
|
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 |
isPrivate()
Get whether the content type is private, i.e.
|
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 |
getCategory, getCSSFiles, getDefaultTitle, getDescription, getEditionMetadataSetNames, getIconDecorator, getIconGlyph, getId, getLabel, getLargeIcon, getMediumIcon, getMetadataSetForEdition, getMetadataSetForView, getPluginName, getSmallIcon, getSupertypeIds, getViewMetadataSetNames
getMetadataDefinition, getMetadataNames
static final String TAG_PRIVATE
static final String TAG_SIMPLE
static final String TAG_MIXIN
void postInitialize() throws Exception
Exception
- if an error occurs of if an additional check fails.List<ContentValidator> getGlobalValidators()
RichTextUpdater getRichTextUpdater()
null
if none.IndexingModel getIndexingModel()
MetadataDefinition getMetadataDefinitionByPath(String metadataPath)
metadataPath
- the metadata path, separated by '/'null
if not foundboolean hasMetadataDefinition(String metadataName)
metadataName
- the metadata name.true
if the metadata definition existsboolean canRead(Content content, MetadataDefinition metadataDef) throws AmetysRepositoryException
metadataDef
- the metadata definitioncontent
- The content where metadata is to be read on. Can be null, on content creation.true
if the current user is allowed to read the metadata of this content.AmetysRepositoryException
- if an error occurs while accessing the content.boolean canWrite(Content content, MetadataDefinition metadataDef) throws AmetysRepositoryException
metadataDef
- the metadata definitioncontent
- The content where metadata is to be written on. Can be null, on content creation.true
if the current user is allowed to write the metadata of this content.AmetysRepositoryException
- if an error occurs while accessing the content.boolean hasTag(String tagName)
tagName
- The tag nameboolean isPrivate()
boolean isSimple()
boolean isAbstract()
boolean isMixin()
String getRight()
void saxContentTypeAdditionalData(ContentHandler contentHandler, Content content) throws AmetysRepositoryException, SAXException
ContentType
These additional data will be available in content viewcontentHandler
- The handler to SAX intocontent
- The contentAmetysRepositoryException
- if an error occurs while accessing the content.SAXException
- if an error occurs while SAXingMap<String,Object> getAdditionalData(Content content)
ContentType
.
These additional data are delivered to client side.content
- The content