Package org.ametys.odf.contenttype
Class ODFContentType
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.cms.contenttype.AbstractContentTypeDescriptor
-
- org.ametys.cms.contenttype.DefaultContentType
-
- org.ametys.odf.contenttype.ODFContentType
-
- All Implemented Interfaces:
ContentType
,ContentTypeDescriptor
,MetadataDefinitionHolder
,Model
,ModelItemAccessor
,ModelItemContainer
,LogEnabled
,PluginAware
,Disposable
,Configurable
,Contextualizable
,Serviceable
,ThreadSafe
public class ODFContentType extends DefaultContentType
The ODF content type
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.cms.contenttype.DefaultContentType
DefaultContentType.AnnotableDefinition, DefaultContentType.MetadataAndRepeaterDefinitionParser, DefaultContentType.RestrictedDefinition, DefaultContentType.RestrictedMetadataDefinition, DefaultContentType.RestrictedRepeaterDefinition, DefaultContentType.RestrictedRichTextDefinition
-
-
Field Summary
Fields Modifier and Type Field Description protected ODFContentTypeMetadataManager
_odfContentTypeMetadataManager
The ODF content type metadata managerprotected ShareableCourseHelper
_shareableCourseHelper
The shareable course helperprotected ShareableCourseStatusHelper
_shareableCourseStatusHelper
The shareable course status helper-
Fields inherited from class org.ametys.cms.contenttype.DefaultContentType
__GLOBAL_VALIDATOR_ROLE_PREFIX, _abstract, _attributeDefinitionParser, _cocoonContext, _compositeDefinitionParser, _configuredWorkflowNames, _context, _defaultWorkflowName, _dublinCoreAttributeDefinitionParser, _globalValidators, _hierarchicalSimpleContentsHelper, _indexingModel, _inheritableTags, _manager, _metadata, _modelItems, _overriddenAttributes, _overriddenViews, _parentAttributeDefinition, _repeaterDefinitionParser, _restrictedModelItemHelper, _richTextOutgoingReferencesExtractor, _richTextTransformer, _richTextUpdater, _right, _tags, _viewConfigurations, _views
-
Fields inherited from class org.ametys.cms.contenttype.AbstractContentTypeDescriptor
_allMetadataSets, _category, _contentTypesHelper, _contentTypesParserHelper, _cssFiles, _cTypeEP, _dcProvider, _defaultTitle, _description, _iconDecorator, _iconGlyph, _id, _label, _largeIcon, _mediumIcon, _metadataSets, _pluginName, _smallIcon, _srcResolver, _superTypeIds
-
Fields inherited from interface org.ametys.cms.contenttype.ContentType
ATTRIBUTE_REF_TAG_NAME_WITH_LEGACY_SYNTAX, GROUP_TAG_NAME_WITH_LEGACY_SYNTAX, TAG_MIXIN, TAG_PRIVATE, TAG_REFERENCE_TABLE, TAG_RENDERABLE_FERENCE_TABLE, VIEW_TAG_NAME, VIEW_TAG_NAME_WITH_LEGACY_SYNTAX
-
-
Constructor Summary
Constructors Constructor Description ODFContentType()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canRead(Content content, MetadataDefinition metadataDef)
Deprecated.boolean
canRead(Content content, RestrictedModelItem<Content> definition)
Determine whether an attribute can be read at this time.boolean
canWrite(Content content, MetadataDefinition metadataDef)
Deprecated.boolean
canWrite(Content content, RestrictedModelItem<Content> definition)
Determine whether an attribute can be written at this time.Map<String,Object>
getAdditionalData(Content content)
Get the additional data relative to itsContentType
.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.cms.contenttype.DefaultContentType
_addSemanticAnnotations, _checkAttributeTypes, _checkAttributeTypes, _checkContentAttributes, _checkContentTypeId, _checkContentTypeSimplicity, _checkMetadataDefinition, _checkMetadataTypes, _checkMutualReferences, _computeIndexingModelReferences, _configureAttributeDefinitions, _configureCustomIndexingFields, _configureCustomMetadataIndexingFields, _configureDefaultWorkflowName, _configureGlobalValidators, _configureIndexingModel, _configureLocalTags, _configureMetadataIndexingFields, _configureParentContentType, _configureViews, _getApplicableAttributes, _getApplicableViews, _getContentTypeReservedAttributeNameExtensionPoint, _getRestrictionsForPath, _getSemanticAnnotations, _parseAllAttributes, _parseAllMetadatas, _parseDublinCoreAttributes, _parseDublinCoreMetadata, _parseGlobalValidators, _parseMetadata, _parseModelItem, _resolveViewReferences, _resolveViewReferences, configure, contextualize, dispose, getConfiguredDefaultWorkflowNames, getDefaultWorkflowName, getFamilyId, getGlobalValidators, getIndexingFieldDefinitions, getIndexingModel, getInheritableTags, getMetadataDefinition, getMetadataDefinitionByPath, getMetadataNames, getModelItems, getOverriddenAttributes, getOverriddenViews, getOverridenConfiguration, getParentAttributeDefinition, getRichTextUpdater, getRight, getRootConfiguration, getTags, getView, getViewConfiguration, getViewNames, hasMetadataDefinition, hasTag, isAbstract, isMixin, isMultilingual, isPrivate, isReferenceTable, isSimple, postInitialize, saxContentTypeAdditionalData, toString
-
Methods inherited from class org.ametys.cms.contenttype.AbstractContentTypeDescriptor
_configureCSSFiles, _configureIcons, _configureLabels, _configureMetadataSets, _configureSuperTypes, _fillMetadataSetDublinCore, _fillMetadataSetElement, _getApplicableMetadataSets, _parseMetadataSet, _parseMetadataSets, getCategory, getCSSFiles, getDefaultTitle, getDescription, getEditionMetadataSetNames, getIconDecorator, getIconGlyph, getId, getLabel, getLargeIcon, getMediumIcon, getMetadataSetForEdition, getMetadataSetForView, getPluginName, getSmallIcon, getSupertypeIds, getViewMetadataSetNames, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.contenttype.ContentType
getViewNames
-
Methods inherited from interface org.ametys.cms.contenttype.ContentTypeDescriptor
getCategory, getCSSFiles, getDefaultCatalog, getDefaultTitle, getDescription, getEditionMetadataSetNames, getIconDecorator, getIconGlyph, getIconPath, getId, getLabel, getLargeIcon, getMediumIcon, getMetadataSetForEdition, getMetadataSetForView, getPluginName, getSmallIcon, getSupertypeIds, getViewMetadataSetNames
-
Methods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItem
-
-
-
-
Field Detail
-
_odfContentTypeMetadataManager
protected ODFContentTypeMetadataManager _odfContentTypeMetadataManager
The ODF content type metadata manager
-
_shareableCourseStatusHelper
protected ShareableCourseStatusHelper _shareableCourseStatusHelper
The shareable course status helper
-
_shareableCourseHelper
protected ShareableCourseHelper _shareableCourseHelper
The shareable course helper
-
-
Constructor Detail
-
ODFContentType
public ODFContentType()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classDefaultContentType
- Throws:
ServiceException
-
canRead
public boolean canRead(Content content, RestrictedModelItem<Content> definition) throws AmetysRepositoryException
Description copied from interface:ContentType
Determine whether an attribute can be read at this time. Method called byAttributeDefinition.canRead(Content)
to do some other checks, depending on the content type- Parameters:
content
- The content where attribute is to be read on. Can be null, on content creation.definition
- the attribute definition- Returns:
true
if the current user is allowed to read the attribute of this content.- Throws:
AmetysRepositoryException
- if an error occurs while accessing the content.
-
canWrite
public boolean canWrite(Content content, RestrictedModelItem<Content> definition) throws AmetysRepositoryException
Description copied from interface:ContentType
Determine whether an attribute can be written at this time. Method called byAttributeDefinition.canWrite(Content)
to do some other checks, depending on the content type- Parameters:
content
- The content where attribute is to be written on. Can be null, on content creation.definition
- the attribute definition- Returns:
true
if the current user is allowed to write the attribute of this content.- Throws:
AmetysRepositoryException
- if an error occurs while accessing the content.
-
canWrite
@Deprecated public boolean canWrite(Content content, MetadataDefinition metadataDef) throws AmetysRepositoryException
Deprecated.Description copied from interface:ContentType
Determine whether a metadata can be written at this time.- Specified by:
canWrite
in interfaceContentType
- Overrides:
canWrite
in classDefaultContentType
- Parameters:
content
- The content where metadata is to be written on. Can be null, on content creation.metadataDef
- the metadata definition- Returns:
true
if the current user is allowed to write the metadata of this content.- Throws:
AmetysRepositoryException
- if an error occurs while accessing the content.
-
canRead
@Deprecated public boolean canRead(Content content, MetadataDefinition metadataDef) throws AmetysRepositoryException
Deprecated.Description copied from interface:ContentType
Determine whether a metadata can be read at this time.- Specified by:
canRead
in interfaceContentType
- Overrides:
canRead
in classDefaultContentType
- Parameters:
content
- The content where metadata is to be read on. Can be null, on content creation.metadataDef
- the metadata definition- Returns:
true
if the current user is allowed to read the metadata of this content.- Throws:
AmetysRepositoryException
- if an error occurs while accessing the content.
-
getAdditionalData
public Map<String,Object> getAdditionalData(Content content)
Description copied from interface:ContentType
Get the additional data relative to itsContentType
. These additional data are delivered to client side.- Specified by:
getAdditionalData
in interfaceContentType
- Overrides:
getAdditionalData
in classDefaultContentType
- Parameters:
content
- The content- Returns:
- the additional properties in a Map
-
-