Package org.ametys.odf.contenttype
Class ODFContentTypeMetadataManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.contenttype.ODFContentTypeMetadataManager
- All Implemented Interfaces:
LogEnabled
,Component
- Direct Known Subclasses:
ODFPilotageContentTypeMetadataManager
Manager for odf content type metadata
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.usecanWrite(Content, RestrictedModelItem)
insteadboolean
canWrite
(Content content, RestrictedModelItem<Content> definition) Determine whether an attribute can be written at this time.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role
-
-
Constructor Details
-
ODFContentTypeMetadataManager
public ODFContentTypeMetadataManager()
-
-
Method Details
-
canRead
public boolean canRead(Content content, RestrictedModelItem<Content> definition) throws AmetysRepositoryException Determine whether an attribute can be read at this time. Method called byRestrictedModelItem.canRead(Object)
to do some other checks, depending on the content type- Parameters:
definition
- the attribute definitioncontent
- The content where attribute is to be read on. Can be null, on content creation.- 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 Determine whether an attribute can be written at this time. Method called byRestrictedModelItem.canWrite(Object)
to do some other checks, depending on the content type- Parameters:
definition
- the attribute definitioncontent
- The content where attribute is to be written on. Can be null, on content creation.- 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.usecanWrite(Content, RestrictedModelItem)
insteadDetermine whether a metadata can be written at this time.- Parameters:
metadataDef
- the metadata definitioncontent
- The content where metadata is to be written on. Can be null, on content creation.- 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.usecanRead(Content, RestrictedModelItem)
insteadDetermine whether a metadata can be read at this time.- Parameters:
metadataDef
- the metadata definitioncontent
- The content where metadata is to be read on. Can be null, on content creation.- 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.
-
canRead(Content, RestrictedModelItem)
instead