Package org.opencms.workflow
Class CmsExtendedPublishResourceFormatter
- java.lang.Object
-
- org.opencms.workflow.CmsDefaultPublishResourceFormatter
-
- org.opencms.workflow.CmsExtendedPublishResourceFormatter
-
- All Implemented Interfaces:
I_CmsPublishResourceFormatter
public class CmsExtendedPublishResourceFormatter extends CmsDefaultPublishResourceFormatter
Publish resource formatter for the extended workflow manager.This class handles warnings differently from the default implementation, since we don't need publish permissions for the release workflow, but need to check whether resources are already in a workflow.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.workflow.CmsDefaultPublishResourceFormatter
CmsDefaultPublishResourceFormatter.AlreadyPublishedValidator, CmsDefaultPublishResourceFormatter.BlockingLockedValidator, CmsDefaultPublishResourceFormatter.DefaultComparator, CmsDefaultPublishResourceFormatter.I_PublishResourceValidator, CmsDefaultPublishResourceFormatter.NoPermissionsValidator, CmsDefaultPublishResourceFormatter.PublishPermissionFilter
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.cache.LoadingCache<CmsUUID,java.lang.Boolean>
m_workflowProjectStatus
Computing map which keeps track of which projects are workflow projects.-
Fields inherited from class org.opencms.workflow.CmsDefaultPublishResourceFormatter
m_options
-
-
Constructor Summary
Constructors Constructor Description CmsExtendedPublishResourceFormatter(CmsObject cms)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.commons.logging.Log
getLog()
Gets the logger for this class.protected java.lang.String
getMessage(java.lang.String key, java.lang.String... args)
Gets a message from the message bundle.protected com.google.common.base.Predicate<CmsResource>
getResourceMapFilter()
Gets the resource map filter.protected java.util.List<CmsDefaultPublishResourceFormatter.I_PublishResourceValidator>
getValidators()
Gets the list of publish resource validators.protected boolean
isWorkflowProject(CmsUUID projectId)
Checks whether the project with the given id is a workflow project.void
setRelease(boolean release)
Sets the 'release' mode.-
Methods inherited from class org.opencms.workflow.CmsDefaultPublishResourceFormatter
computeWarnings, createPublishResource, getLocale, getOuAwareName, getPublishResources, initialize, sortResult
-
-
-
-
Field Detail
-
m_workflowProjectStatus
protected com.google.common.cache.LoadingCache<CmsUUID,java.lang.Boolean> m_workflowProjectStatus
Computing map which keeps track of which projects are workflow projects.
-
-
Constructor Detail
-
CmsExtendedPublishResourceFormatter
public CmsExtendedPublishResourceFormatter(CmsObject cms)
Constructor.- Parameters:
cms
- the CMS context to use
-
-
Method Detail
-
getLog
public static org.apache.commons.logging.Log getLog()
Gets the logger for this class.- Returns:
- the logger for this class
-
setRelease
public void setRelease(boolean release)
Sets the 'release' mode.- Parameters:
release
- true if the resources should be formatted for the 'release' workflow
-
getMessage
protected java.lang.String getMessage(java.lang.String key, java.lang.String... args)
Gets a message from the message bundle.- Parameters:
key
- the message keyargs
- the message parameters- Returns:
- the message from the message bundle
-
getResourceMapFilter
protected com.google.common.base.Predicate<CmsResource> getResourceMapFilter()
Description copied from class:CmsDefaultPublishResourceFormatter
Gets the resource map filter.This can be used to remove resources which shouldn't be displayed.
- Overrides:
getResourceMapFilter
in classCmsDefaultPublishResourceFormatter
- Returns:
- a predicate whose
- See Also:
CmsDefaultPublishResourceFormatter.getResourceMapFilter()
-
getValidators
protected java.util.List<CmsDefaultPublishResourceFormatter.I_PublishResourceValidator> getValidators()
Description copied from class:CmsDefaultPublishResourceFormatter
Gets the list of publish resource validators.- Overrides:
getValidators
in classCmsDefaultPublishResourceFormatter
- Returns:
- the list of publish resource validators
- See Also:
CmsDefaultPublishResourceFormatter.getValidators()
-
isWorkflowProject
protected boolean isWorkflowProject(CmsUUID projectId)
Checks whether the project with the given id is a workflow project.- Parameters:
projectId
- the project id- Returns:
- true if the project with the given id is a workflow project
-
-