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, AttributeDefinition definition) Determine whether an attribute can be read at this time.boolean
canRead
(Content content, MetadataDefinition metadataDef) Deprecated.boolean
canWrite
(Content content, AttributeDefinition definition) Determine whether an attribute can be written at this time.boolean
canWrite
(Content content, MetadataDefinition metadataDef) Deprecated.usecanWrite(Content, AttributeDefinition)
insteadMethods 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, AttributeDefinition definition) throws AmetysRepositoryException 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:
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, AttributeDefinition definition) throws AmetysRepositoryException 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:
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, AttributeDefinition)
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, AttributeDefinition)
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, AttributeDefinition)
instead