Class ODFPilotageContentTypeMetadataManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.contenttype.ODFContentTypeMetadataManager
org.ametys.plugins.odfpilotage.manager.ODFPilotageContentTypeMetadataManager
- All Implemented Interfaces:
LogEnabled
,Component
,Configurable
,Contextualizable
,Serviceable
public class ODFPilotageContentTypeMetadataManager
extends ODFContentTypeMetadataManager
implements Configurable, Contextualizable, Serviceable
The odf content type metadata manager for pilotage
-
Field Summary
Modifier and TypeFieldDescriptionprotected Context
The Cocoon contextThe map of disabled metadatas for each content type and each pilotage statusprotected PilotageStatusHelper
The pilotage status helperFields inherited from class org.ametys.odf.contenttype.ODFContentTypeMetadataManager
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Fill the disabled metadata from the configurationprotected List<PilotageStatusHelper.PilotageStatus>
_getStatusToCheck
(PilotageStatusHelper.PilotageStatus pilotageStatus) Get the list of pilotage status to checkboolean
canWrite
(Content content, AttributeDefinition definition) Determine whether an attribute can be written at this time.boolean
canWrite
(Content content, MetadataDefinition metadataDef) Deprecated.void
configure
(Configuration configuration) void
contextualize
(Context context) void
service
(ServiceManager manager) Methods inherited from class org.ametys.odf.contenttype.ODFContentTypeMetadataManager
canRead, canRead
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_cocoonContext
The Cocoon context -
_pilotageStatusHelper
The pilotage status helper -
_disabledMetadata
The map of disabled metadatas for each content type and each pilotage status
-
-
Constructor Details
-
ODFPilotageContentTypeMetadataManager
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
_fillDisableMetadataMap
Fill the disabled metadata from the configuration- Parameters:
cfg
- the configuration- Throws:
ConfigurationException
- if an error occurred
-
canWrite
public boolean canWrite(Content content, AttributeDefinition definition) throws AmetysRepositoryException Description copied from class:ODFContentTypeMetadataManager
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- Overrides:
canWrite
in classODFContentTypeMetadataManager
- 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 class:ODFContentTypeMetadataManager
Determine whether a metadata can be written at this time.- Overrides:
canWrite
in classODFContentTypeMetadataManager
- 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.
-
_getStatusToCheck
protected List<PilotageStatusHelper.PilotageStatus> _getStatusToCheck(PilotageStatusHelper.PilotageStatus pilotageStatus) Get the list of pilotage status to check- Parameters:
pilotageStatus
- the pilotage status of the content- Returns:
- the list of pilotage status to check
-