Package org.opencms.workflow
Interface I_CmsWorkflowManager
-
- All Known Implementing Classes:
A_CmsWorkflowManager
,CmsDefaultWorkflowManager
,CmsExtendedWorkflowManager
public interface I_CmsWorkflowManager
Workflow manager interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description I_CmsPublishResourceFormatter
createFormatter(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options)
Creates the formatter for formatting the resources to be displayed to the user.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.util.List<CmsProjectBean>
getManageableProjects(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params)
Returns the current user's manageable projects.java.util.Map<java.lang.String,java.lang.String>
getParameters()
Gets the parameters of the workflow manager.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.void
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets the configuration parameters of the workflow manager.
-
-
-
Method Detail
-
createFormatter
I_CmsPublishResourceFormatter createFormatter(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options)
Creates the formatter for formatting the resources to be displayed to the user.- Parameters:
cms
- the CMS context to useworkflow
- the current workflowoptions
- the publish options- Returns:
- the publish resource formatter to use
-
executeAction
CmsWorkflowResponse executeAction(CmsObject cms, CmsWorkflowAction action, CmsPublishListToken token) throws CmsException
Executes a workflow action for a publish list token instead of a resource list.- Parameters:
cms
- the CMS context to useaction
- the action to performtoken
- the publish list token to use- Returns:
- the workflow response
- Throws:
CmsException
- if something goes wrong
-
executeAction
CmsWorkflowResponse executeAction(CmsObject userCms, CmsWorkflowAction action, CmsPublishOptions options, java.util.List<CmsResource> resources) throws CmsException
Executes a workflow action in the context of the current user.- Parameters:
userCms
- the current user's CMS contextaction
- the workflow actionoptions
- the publish optionsresources
- the resources to be processed- Returns:
- the workflow response for the executed action
- Throws:
CmsException
- if something goes wrong
-
getManageableProjects
java.util.List<CmsProjectBean> getManageableProjects(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params)
Returns the current user's manageable projects.- Parameters:
cms
- the CMS context to useparams
- the publish parameters- Returns:
- the current user's manageable projects
-
getParameters
java.util.Map<java.lang.String,java.lang.String> getParameters()
Gets the parameters of the workflow manager.- Returns:
- the configuration parameters of the workflow manager
-
getPublishListToken
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.- Parameters:
cms
- the CMS context to useworkflow
- the workflowoptions
- the publish options- Returns:
- the publish list token
-
getRealOrVirtualProject
I_CmsVirtualProject getRealOrVirtualProject(CmsUUID projectId)
Gets the virtual project object identified by the given id.- Parameters:
projectId
- the virtual project id- Returns:
- the virtual project object
-
getResourceLimit
int getResourceLimit()
Gets the resource limit.Publish lists which exceed this limit (counted before adding any related resources, siblings etc.) are not displayed to the user.
- Returns:
- the resource limit
-
getWorkflowForWorkflowProject
java.lang.String getWorkflowForWorkflowProject(CmsUUID projectId)
Gets the workflow id which should be used for a given workflow project.- Parameters:
projectId
- the project id- Returns:
- the workflow id for the project
-
getWorkflowResources
CmsWorkflowResources getWorkflowResources(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options, boolean canOverride, boolean ignoreLimit)
Returns the resources for the given workflow and project.- Parameters:
cms
- 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 ignored- Returns:
- the workflow resources
-
getWorkflows
java.util.Map<java.lang.String,CmsWorkflow> getWorkflows(CmsObject cms)
Returns the available workflows for the current user.- Parameters:
cms
- the user cms context- Returns:
- the available workflows
-
initialize
void initialize(CmsObject adminCms)
Initializes this workflow manager instance.- Parameters:
adminCms
- the CMS context with admin privileges
-
setParameters
void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets the configuration parameters of the workflow manager.- Parameters:
parameters
- the map of configuration parameters
-
-