public class ODFPilotageContentTypeMetadataManager extends ODFContentTypeMetadataManager implements Configurable, Contextualizable, Serviceable
Modifier and Type | Field and Description |
---|---|
protected Context |
_cocoonContext
The Cocoon context
|
protected Map<String,Map<PilotageStatusHelper.PilotageStatus,List<String>>> |
_disabledMetadata
The map of disabled metadatas for each content type and each pilotage status
|
private static String |
_METADATA_FILE_PATH |
private static String |
_METADATA_FILE_PATH_TO_OVERRIDE |
protected PilotageStatusHelper |
_pilotageStatusHelper
The pilotage status helper
|
ROLE
Constructor and Description |
---|
ODFPilotageContentTypeMetadataManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
_fillDisableMetadataMap(Configuration cfg)
Fill the disabled metadata from the configuration
|
protected List<PilotageStatusHelper.PilotageStatus> |
_getStatusToCheck(PilotageStatusHelper.PilotageStatus pilotageStatus)
Get the list of pilotage status to check
|
boolean |
canWrite(Content content,
MetadataDefinition metadataDef)
Determine whether a metadata can be written at this time.
|
void |
configure(Configuration configuration) |
void |
contextualize(Context context) |
void |
service(ServiceManager manager) |
canRead
getLogger, setLogger
private static String _METADATA_FILE_PATH
private static String _METADATA_FILE_PATH_TO_OVERRIDE
protected Context _cocoonContext
protected PilotageStatusHelper _pilotageStatusHelper
protected Map<String,Map<PilotageStatusHelper.PilotageStatus,List<String>>> _disabledMetadata
public ODFPilotageContentTypeMetadataManager()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
protected void _fillDisableMetadataMap(Configuration cfg) throws ConfigurationException
cfg
- the configurationConfigurationException
- if an error occurredpublic boolean canWrite(Content content, MetadataDefinition metadataDef) throws AmetysRepositoryException
ODFContentTypeMetadataManager
canWrite
in class ODFContentTypeMetadataManager
content
- The content where metadata is to be written on. Can be null, on content creation.metadataDef
- the metadata definitiontrue
if the current user is allowed to write the metadata of this content.AmetysRepositoryException
- if an error occurs while accessing the content.protected List<PilotageStatusHelper.PilotageStatus> _getStatusToCheck(PilotageStatusHelper.PilotageStatus pilotageStatus)
pilotageStatus
- the pilotage status of the content