public class CmsExtendedPublishResourceFormatter extends CmsDefaultPublishResourceFormatter
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.
CmsDefaultPublishResourceFormatter.AlreadyPublishedValidator, CmsDefaultPublishResourceFormatter.BlockingLockedValidator, CmsDefaultPublishResourceFormatter.DefaultComparator, CmsDefaultPublishResourceFormatter.I_PublishResourceValidator, CmsDefaultPublishResourceFormatter.NoPermissionsValidator, CmsDefaultPublishResourceFormatter.PublishPermissionFilter| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.cache.LoadingCache<CmsUUID,java.lang.Boolean> |
m_workflowProjectStatus
Computing map which keeps track of which projects are workflow projects.
|
m_options| Constructor and Description |
|---|
CmsExtendedPublishResourceFormatter(CmsObject cms)
Constructor.
|
| Modifier and Type | Method and 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.
|
computeWarnings, createPublishResource, getLocale, getOuAwareName, getPublishResources, initialize, sortResultprotected com.google.common.cache.LoadingCache<CmsUUID,java.lang.Boolean> m_workflowProjectStatus
public CmsExtendedPublishResourceFormatter(CmsObject cms)
cms - the CMS context to usepublic static org.apache.commons.logging.Log getLog()
public void setRelease(boolean release)
release - true if the resources should be formatted for the 'release' workflowprotected java.lang.String getMessage(java.lang.String key, java.lang.String... args)
key - the message keyargs - the message parametersprotected com.google.common.base.Predicate<CmsResource> getResourceMapFilter()
CmsDefaultPublishResourceFormatterThis can be used to remove resources which shouldn't be displayed.
getResourceMapFilter in class CmsDefaultPublishResourceFormatterCmsDefaultPublishResourceFormatter.getResourceMapFilter()protected java.util.List<CmsDefaultPublishResourceFormatter.I_PublishResourceValidator> getValidators()
CmsDefaultPublishResourceFormattergetValidators in class CmsDefaultPublishResourceFormatterCmsDefaultPublishResourceFormatter.getValidators()protected boolean isWorkflowProject(CmsUUID projectId)
projectId - the project id