org.opencms.workflow
Class CmsDefaultWorkflowManager

java.lang.Object
  extended by org.opencms.workflow.A_CmsWorkflowManager
      extended by org.opencms.workflow.CmsDefaultWorkflowManager
All Implemented Interfaces:
I_CmsWorkflowManager
Direct Known Subclasses:
CmsExtendedWorkflowManager

public class CmsDefaultWorkflowManager
extends A_CmsWorkflowManager

The default implementation of the workflow manager interface, which offers only publish functionality.


Field Summary
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 WORKFLOW_PUBLISH
          The name for the publish action.
 
Fields inherited from class org.opencms.workflow.A_CmsWorkflowManager
m_adminCms, m_parameters
 
Constructor Summary
CmsDefaultWorkflowManager()
           
 
Method Summary
protected  CmsWorkflowResponse actionForcePublish(CmsObject userCms, 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.
 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<CmsPublishResource> getWorkflowPublishResources(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options)
          Returns the publish resource beans for the given workflow and project.
 java.util.List<CmsResource> getWorkflowResources(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options)
          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.
 
Methods inherited from class org.opencms.workflow.A_CmsWorkflowManager
getLocale, getParameter, getParameters, initialize, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_FORCE_PUBLISH

public static final java.lang.String ACTION_FORCE_PUBLISH
The forced publish workflow action.

See Also:
Constant Field Values

ACTION_PUBLISH

public static final java.lang.String ACTION_PUBLISH
The publish workflow action.

See Also:
Constant Field Values

WORKFLOW_PUBLISH

public static final java.lang.String WORKFLOW_PUBLISH
The name for the publish action.

See Also:
Constant Field Values
Constructor Detail

CmsDefaultWorkflowManager

public CmsDefaultWorkflowManager()
Method Detail

executeAction

public CmsWorkflowResponse executeAction(CmsObject userCms,
                                         CmsWorkflowAction action,
                                         CmsPublishOptions options,
                                         java.util.List<CmsResource> resources)
                                  throws CmsException
Description copied from interface: I_CmsWorkflowManager
Executes a workflow action in the context of the current user.

Parameters:
userCms - the current user's CMS context
action - the workflow action
options - the publish options
resources - the resources to be processed
Returns:
the workflow response for the executed action
Throws:
CmsException - if something goes wrong
See Also:
I_CmsWorkflowManager.executeAction(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflowAction, org.opencms.ade.publish.shared.CmsPublishOptions, java.util.List)

getLabel

public java.lang.String getLabel(CmsObject cms,
                                 java.lang.String key)
Gets the localized label for a given CMS context and key.

Parameters:
cms - the CMS context
key - the localization key
Returns:
the localized label

getWorkflowPublishResources

public java.util.List<CmsPublishResource> getWorkflowPublishResources(CmsObject cms,
                                                                      CmsWorkflow workflow,
                                                                      CmsPublishOptions options)
Description copied from interface: I_CmsWorkflowManager
Returns the publish resource beans for the given workflow and project.

Parameters:
cms - the user cms context
workflow - the workflow
options - the resource options
Returns:
the workflow publish resource beans
See Also:
I_CmsWorkflowManager.getWorkflowPublishResources(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflow, org.opencms.ade.publish.shared.CmsPublishOptions)

getWorkflowResources

public java.util.List<CmsResource> getWorkflowResources(CmsObject cms,
                                                        CmsWorkflow workflow,
                                                        CmsPublishOptions options)
Description copied from interface: I_CmsWorkflowManager
Returns the resources for the given workflow and project.

Parameters:
cms - the user cms context
workflow - the workflow
options - the resource options
Returns:
the workflow resources
See Also:
I_CmsWorkflowManager.getWorkflowResources(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflow, org.opencms.ade.publish.shared.CmsPublishOptions)

getWorkflows

public java.util.Map<java.lang.String,CmsWorkflow> getWorkflows(CmsObject cms)
Description copied from interface: I_CmsWorkflowManager
Returns the available workflows for the current user.

Parameters:
cms - the user cms context
Returns:
the available workflows
See Also:
I_CmsWorkflowManager.getWorkflows(org.opencms.file.CmsObject)

actionForcePublish

protected CmsWorkflowResponse actionForcePublish(CmsObject userCms,
                                                 java.util.List<CmsResource> resources)
                                          throws CmsException
The implementation of the "forcepublish" workflow action.

Parameters:
userCms - the user CMS context
resources - the resources which the action should process
Returns:
the workflow response
Throws:
CmsException - if something goes wrong

actionPublish

protected CmsWorkflowResponse actionPublish(CmsObject userCms,
                                            CmsPublishOptions options,
                                            java.util.List<CmsResource> resources)
                                     throws CmsException
The implementation of the "publish" workflow action.

Parameters:
userCms - the user CMS context
options - the publish options
resources - the resources which the action should process
Returns:
the workflow response
Throws:
CmsException - if something goes wrong