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
public class ODFContentTypeMetadataManager extends AbstractLogEnabled implements Component
Manager for odf content type metadata
-
-
Constructor Summary
Constructors Constructor Description ODFContentTypeMetadataManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canRead(Content content, AttributeDefinition definition)
Determine whether an attribute can be read at this time.boolean
canRead(Content content, MetadataDefinition metadataDef)
Deprecated.usecanRead(Content, AttributeDefinition)
insteadboolean
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)
instead-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
ODFContentTypeMetadataManager
public ODFContentTypeMetadataManager()
-
-
Method Detail
-
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.
-
-