public class CmsDefaultWorkflowManager extends A_CmsWorkflowManager
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACTION_FORCE_PUBLISH
The forced publish workflow action.
|
static java.lang.String |
ACTION_PUBLISH
The publish workflow action.
|
static java.lang.String |
ATTR_CHECK_PUBLISH_RESOURCE_LIMIT
If a request context attribute of this name is set, some internal methods used
to collect lists of resources for publishing will 'give up' and throw an exception
when the number of resources exceeds the resource limit of the workflow manager.
|
static int |
DEFAULT_RESOURCE_LIMIT
Default value for the maximum number of resources in the initial publish list.
|
protected java.util.Map<CmsUUID,I_CmsVirtualProject> |
m_virtualProjects
The map of registered virtual projects.
|
static java.lang.String |
PARAM_RESOURCE_LIMIT
The parameter name for the resource limit.
|
static java.lang.String |
WORKFLOW_PUBLISH
The name for the publish action.
|
m_adminCms, m_parameters| Constructor and Description |
|---|
CmsDefaultWorkflowManager()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected CmsWorkflowResponse |
actionForcePublish(CmsObject userCms,
CmsPublishOptions options,
java.util.List<CmsResource> resources)
The implementation of the "forcepublish" workflow action.
|
protected CmsWorkflowResponse |
actionPublish(CmsObject userCms,
CmsPublishOptions options,
java.util.List<CmsResource> resources)
The implementation of the "publish" workflow action.
|
I_CmsPublishResourceFormatter |
createFormatter(CmsObject cms,
CmsWorkflow workflow,
CmsPublishOptions options)
Creates the formatter for formatting the resources to be displayed to the user.
|
static CmsProjectBean |
createProjectBeanFromProject(CmsObject cms,
CmsProject project)
Creates a project bean from a real project.
|
CmsWorkflowResponse |
executeAction(CmsObject cms,
CmsWorkflowAction action,
CmsPublishListToken token)
Executes a workflow action for a publish list token instead of a resource list.
|
CmsWorkflowResponse |
executeAction(CmsObject userCms,
CmsWorkflowAction action,
CmsPublishOptions options,
java.util.List<CmsResource> resources)
Executes a workflow action in the context of the current user.
|
java.lang.String |
getLabel(CmsObject cms,
java.lang.String key)
Gets the localized label for a given CMS context and key.
|
java.util.List<CmsProjectBean> |
getManageableProjects(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
Returns the current user's manageable projects.
|
protected static java.lang.String |
getOuAwareName(CmsObject cms,
java.lang.String name)
Returns the simple name if the ou is the same as the current user's ou.
|
CmsPublishListToken |
getPublishListToken(CmsObject cms,
CmsWorkflow workflow,
CmsPublishOptions options)
Gets a publish list token for the given parameters which can be used later to reconstruct the publish list.
|
I_CmsVirtualProject |
getRealOrVirtualProject(CmsUUID projectId)
Gets the virtual project object identified by the given id.
|
int |
getResourceLimit()
Gets the resource limit.
|
java.lang.String |
getWorkflowForWorkflowProject(CmsUUID projectId)
Gets the workflow id which should be used for a given workflow project.
|
CmsWorkflowResources |
getWorkflowResources(CmsObject cms,
CmsWorkflow workflow,
CmsPublishOptions options,
boolean canOverride,
boolean ignoreLimit)
Returns the resources for the given workflow and project.
|
java.util.Map<java.lang.String,CmsWorkflow> |
getWorkflows(CmsObject cms)
Returns the available workflows for the current user.
|
void |
initialize(CmsObject adminCms)
Initializes this workflow manager instance.
|
getLocale, getParameter, getParameters, setParameterspublic static final java.lang.String ACTION_FORCE_PUBLISH
public static final java.lang.String ACTION_PUBLISH
public static int DEFAULT_RESOURCE_LIMIT
public static final java.lang.String PARAM_RESOURCE_LIMIT
public static final java.lang.String WORKFLOW_PUBLISH
public static final java.lang.String ATTR_CHECK_PUBLISH_RESOURCE_LIMIT
protected java.util.Map<CmsUUID,I_CmsVirtualProject> m_virtualProjects
public CmsDefaultWorkflowManager()
public static CmsProjectBean createProjectBeanFromProject(CmsObject cms, CmsProject project)
cms - the CMS contextproject - the projectprotected static java.lang.String getOuAwareName(CmsObject cms, java.lang.String name)
cms - the CMS contextname - the fully qualified name to checkpublic I_CmsPublishResourceFormatter createFormatter(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options)
I_CmsWorkflowManagercms - the CMS context to useworkflow - the current workflowoptions - the publish optionsI_CmsWorkflowManager.createFormatter(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflow, org.opencms.ade.publish.shared.CmsPublishOptions)public CmsWorkflowResponse executeAction(CmsObject cms, CmsWorkflowAction action, CmsPublishListToken token) throws CmsException
I_CmsWorkflowManagercms - the CMS context to useaction - the action to performtoken - the publish list token to useCmsException - if something goes wrongI_CmsWorkflowManager.executeAction(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflowAction, org.opencms.ade.publish.shared.CmsPublishListToken)public CmsWorkflowResponse executeAction(CmsObject userCms, CmsWorkflowAction action, CmsPublishOptions options, java.util.List<CmsResource> resources) throws CmsException
I_CmsWorkflowManageruserCms - the current user's CMS contextaction - the workflow actionoptions - the publish optionsresources - the resources to be processedCmsException - if something goes wrongI_CmsWorkflowManager.executeAction(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflowAction, org.opencms.ade.publish.shared.CmsPublishOptions, java.util.List)public java.lang.String getLabel(CmsObject cms, java.lang.String key)
cms - the CMS contextkey - the localization keypublic java.util.List<CmsProjectBean> getManageableProjects(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params)
I_CmsWorkflowManagercms - the CMS context to useparams - the publish parametersI_CmsWorkflowManager.getManageableProjects(org.opencms.file.CmsObject, java.util.Map)public CmsPublishListToken getPublishListToken(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options)
I_CmsWorkflowManagercms - the CMS context to useworkflow - the workflowoptions - the publish optionsI_CmsWorkflowManager.getPublishListToken(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflow, org.opencms.ade.publish.shared.CmsPublishOptions)public I_CmsVirtualProject getRealOrVirtualProject(CmsUUID projectId)
I_CmsWorkflowManagerprojectId - the virtual project idI_CmsWorkflowManager.getRealOrVirtualProject(org.opencms.util.CmsUUID)public int getResourceLimit()
I_CmsWorkflowManagerPublish lists which exceed this limit (counted before adding any related resources, siblings etc.) are not displayed to the user.
I_CmsWorkflowManager.getResourceLimit()public java.lang.String getWorkflowForWorkflowProject(CmsUUID projectId)
I_CmsWorkflowManagerprojectId - the project idI_CmsWorkflowManager.getWorkflowForWorkflowProject(org.opencms.util.CmsUUID)public CmsWorkflowResources getWorkflowResources(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options, boolean canOverride, boolean ignoreLimit)
I_CmsWorkflowManagercms - the user cms contextworkflow - the workflowoptions - the resource optionscanOverride - flag to indicate whether the workflow manager should be able to override the selected workflowignoreLimit - true if the workflow manager's resource limit should be ignoredI_CmsWorkflowManager.getWorkflowResources(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflow, org.opencms.ade.publish.shared.CmsPublishOptions, boolean, boolean)public java.util.Map<java.lang.String,CmsWorkflow> getWorkflows(CmsObject cms)
I_CmsWorkflowManagercms - the user cms contextI_CmsWorkflowManager.getWorkflows(org.opencms.file.CmsObject)public void initialize(CmsObject adminCms)
I_CmsWorkflowManagerinitialize in interface I_CmsWorkflowManagerinitialize in class A_CmsWorkflowManageradminCms - the CMS context with admin privilegesA_CmsWorkflowManager.initialize(org.opencms.file.CmsObject)protected CmsWorkflowResponse actionForcePublish(CmsObject userCms, CmsPublishOptions options, java.util.List<CmsResource> resources) throws CmsException
userCms - the user CMS contextresources - the resources which the action should processoptions - the publish options to useCmsException - if something goes wrongprotected CmsWorkflowResponse actionPublish(CmsObject userCms, CmsPublishOptions options, java.util.List<CmsResource> resources) throws CmsException
userCms - the user CMS contextoptions - the publish optionsresources - the resources which the action should processCmsException - if something goes wrong