Package org.ametys.cms.contenttype
Class ContentTypeDefinition
java.lang.Object
org.ametys.cms.contenttype.ContentTypeDefinition
- All Implemented Interfaces:
ContentTypeDescriptor
This class represents a type of content
-
Constructor Summary
ConstructorDescriptionConstructs a new representative of a content type -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the category of the content type.Returns the list of CSS files needed to correctly display the content's in BO, such as the content's iconRetrieves the default title of the content type.Retrieves the description of the content type.getEditionMetadataSetNames
(boolean includeInternal) Returns all names of "edition" metadataSets.Retrieves the CSS class to use for decorator above the main iconRetrieves the CSS class to use for glyph icongetId()
Retrieves the id of the content type.getLabel()
Retrieves the label of the content type.Retrieves the URL of the icon without the context path.Retrieves the URL of the icon without the context path.getMetadataSetForEdition
(String metadataSetName) Retrieves the metadata set name for edition.getMetadataSetForView
(String metadataSetName) Retrieves the metadata set name for view.Get metadata of content typeGet the parent reference of content typeRetrieves the name of the plugin declaring this content type.getRight()
Get the right of the content typeRetrieves the URL of the icon without the context path.String[]
Retrieves the super type's ids.getTags()
Get tags of content typegetViewMetadataSetNames
(boolean includeInternal) Returns all names of "view" metadataSets.getViews()
Get metadataSet of content typeboolean
Indicates if the content type is abstractvoid
setCategory
(I18nizableText category) Set the category of content typevoid
setCSSFiles
(List<ClientSideElement.ScriptFile> cSSFiles) Set CSS files of content typevoid
setDefaultTitle
(I18nizableText defaultTitle) Set the default title of content typevoid
setDescription
(I18nizableText description) Set the description of content typevoid
setIconDecorator
(String iconDecorator) Set icon decorator of content typevoid
setIconGlyph
(String iconGlyph) Set icon glyph of content typevoid
Set id of content typevoid
setIsAbstract
(boolean isAbstract) Set if content type is abstractvoid
setLabel
(I18nizableText label) Set the label of content typevoid
setLargeIcon
(String largeIcon) Set large icon of content typevoid
setMediumIcon
(String mediumIcon) Set medium icon of content typevoid
setModelItems
(List<ModelItem> modelItems) Set model items of content typevoid
setParentRef
(String parentRef) Set the parent reference of content typevoid
setPluginName
(String pluginName) Set the plugin name of content typevoid
Set the right of content typevoid
setSupertypeIds
(String[] supertypeIds) Set supertypes of content typevoid
Set tags of content typevoid
Set views of content typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.cms.contenttype.ContentTypeDescriptor
getDefaultCatalog, getIconPath
-
Constructor Details
-
ContentTypeDefinition
Constructs a new representative of a content type- Parameters:
id
- id of content type
-
-
Method Details
-
getId
Description copied from interface:ContentTypeDescriptor
Retrieves the id of the content type.- Specified by:
getId
in interfaceContentTypeDescriptor
- Returns:
- the id.
-
getPluginName
Description copied from interface:ContentTypeDescriptor
Retrieves the name of the plugin declaring this content type.- Specified by:
getPluginName
in interfaceContentTypeDescriptor
- Returns:
- the name of the plugin.
-
getLabel
Description copied from interface:ContentTypeDescriptor
Retrieves the label of the content type.- Specified by:
getLabel
in interfaceContentTypeDescriptor
- Returns:
- the label.
-
getDescription
Description copied from interface:ContentTypeDescriptor
Retrieves the description of the content type.- Specified by:
getDescription
in interfaceContentTypeDescriptor
- Returns:
- the description.
-
getDefaultTitle
Description copied from interface:ContentTypeDescriptor
Retrieves the default title of the content type.- Specified by:
getDefaultTitle
in interfaceContentTypeDescriptor
- Returns:
- the default title.
-
getCategory
Description copied from interface:ContentTypeDescriptor
Retrieves the category of the content type.- Specified by:
getCategory
in interfaceContentTypeDescriptor
- Returns:
- the category.
-
getSupertypeIds
Description copied from interface:ContentTypeDescriptor
Retrieves the super type's ids.- Specified by:
getSupertypeIds
in interfaceContentTypeDescriptor
- Returns:
- the super type's ids, or empty if this content type doesn't extend a specific content type.
-
isAbstract
Indicates if the content type is abstract- Returns:
- True if the content type is abstract, false otherwise.
-
getIconGlyph
Description copied from interface:ContentTypeDescriptor
Retrieves the CSS class to use for glyph icon- Specified by:
getIconGlyph
in interfaceContentTypeDescriptor
- Returns:
- the glyph name.
-
getIconDecorator
Description copied from interface:ContentTypeDescriptor
Retrieves the CSS class to use for decorator above the main icon- Specified by:
getIconDecorator
in interfaceContentTypeDescriptor
- Returns:
- the glyph name.
-
getSmallIcon
Description copied from interface:ContentTypeDescriptor
Retrieves the URL of the icon without the context path.- Specified by:
getSmallIcon
in interfaceContentTypeDescriptor
- Returns:
- the icon URL for the small image 16x16.
-
getMediumIcon
Description copied from interface:ContentTypeDescriptor
Retrieves the URL of the icon without the context path.- Specified by:
getMediumIcon
in interfaceContentTypeDescriptor
- Returns:
- the icon URL for the medium sized image 32x32.
-
getLargeIcon
Description copied from interface:ContentTypeDescriptor
Retrieves the URL of the icon without the context path.- Specified by:
getLargeIcon
in interfaceContentTypeDescriptor
- Returns:
- the icon URL for the large image 48x48.
-
getViewMetadataSetNames
Description copied from interface:ContentTypeDescriptor
Returns all names of "view" metadataSets.- Specified by:
getViewMetadataSetNames
in interfaceContentTypeDescriptor
- Parameters:
includeInternal
- if the result should include internal metadataSets.- Returns:
- all names of "view" metadataSets.
-
getEditionMetadataSetNames
Description copied from interface:ContentTypeDescriptor
Returns all names of "edition" metadataSets.- Specified by:
getEditionMetadataSetNames
in interfaceContentTypeDescriptor
- Parameters:
includeInternal
- if the result should include internal metadataSets.- Returns:
- all names of "edition" metadataSets.
-
getMetadataSetForView
Description copied from interface:ContentTypeDescriptor
Retrieves the metadata set name for view.- Specified by:
getMetadataSetForView
in interfaceContentTypeDescriptor
- Parameters:
metadataSetName
- the metadata set name.- Returns:
- the metadata definition.
-
getMetadataSetForEdition
Description copied from interface:ContentTypeDescriptor
Retrieves the metadata set name for edition.- Specified by:
getMetadataSetForEdition
in interfaceContentTypeDescriptor
- Parameters:
metadataSetName
- the metadata set name.- Returns:
- the metadata set.
-
getCSSFiles
Description copied from interface:ContentTypeDescriptor
Returns the list of CSS files needed to correctly display the content's in BO, such as the content's icon- Specified by:
getCSSFiles
in interfaceContentTypeDescriptor
- Returns:
- The list of CSS files needed. Must not be null.
-
getRight
Get the right of the content type- Returns:
- the right of the content type
-
getTags
Get tags of content type- Returns:
- tags of content type
-
getViews
Get metadataSet of content type- Returns:
- metadataset of content type
-
getModelItems
Get metadata of content type- Returns:
- metadata of content type
-
getParentRef
Get the parent reference of content type- Returns:
- the parent reference of content type
-
setRight
Set the right of content type- Parameters:
right
- the right to set
-
setTags
Set tags of content type- Parameters:
tags
- tags to set
-
setModelItems
Set model items of content type- Parameters:
modelItems
- model items to set
-
setViews
Set views of content type- Parameters:
views
- views to set
-
setId
Set id of content type- Parameters:
id
- the id to set
-
setPluginName
Set the plugin name of content type- Parameters:
pluginName
- the plugin name to set
-
setLabel
Set the label of content type- Parameters:
label
- the label to set
-
setDescription
Set the description of content type- Parameters:
description
- the description to set
-
setDefaultTitle
Set the default title of content type- Parameters:
defaultTitle
- the default title to set
-
setCategory
Set the category of content type- Parameters:
category
- the category of content type
-
setSupertypeIds
Set supertypes of content type- Parameters:
supertypeIds
- supertypes to set
-
setIconGlyph
Set icon glyph of content type- Parameters:
iconGlyph
- icon glyph to set
-
setIconDecorator
Set icon decorator of content type- Parameters:
iconDecorator
- icon decorator to set
-
setLargeIcon
Set large icon of content type- Parameters:
largeIcon
- large icon to set
-
setMediumIcon
Set medium icon of content type- Parameters:
mediumIcon
- medium icon to set
-
setCSSFiles
Set CSS files of content type- Parameters:
cSSFiles
- css files to set
-
setIsAbstract
Set if content type is abstract- Parameters:
isAbstract
- the boolean to set
-
setParentRef
Set the parent reference of content type- Parameters:
parentRef
- the parent reference to set
-