public class CmsDefaultWorkflowManager extends A_CmsWorkflowManager
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
ACTION_FORCE_PUBLISH
The forced publish workflow action.
|
static java.lang.String |
ACTION_PUBLISH
The publish workflow action.
|
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
构造器和说明 |
---|
CmsDefaultWorkflowManager()
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
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.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.
|
void |
initialize(CmsObject adminCms)
Initializes this workflow manager instance.
|
getLocale, getParameter, getParameters, setParameters
public 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
protected java.util.Map<CmsUUID,I_CmsVirtualProject> m_virtualProjects
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_CmsWorkflowManager
cms
- 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_CmsWorkflowManager
cms
- 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_CmsWorkflowManager
userCms
- 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_CmsWorkflowManager
cms
- 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_CmsWorkflowManager
cms
- 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_CmsWorkflowManager
projectId
- the virtual project idI_CmsWorkflowManager.getRealOrVirtualProject(org.opencms.util.CmsUUID)
public int getResourceLimit()
I_CmsWorkflowManager
Publish lists which exceed this limit (counted before adding any related resources, siblings etc.) are not displayed to the user.
I_CmsWorkflowManager.getResourceLimit()
public java.util.List<CmsResource> getWorkflowResources(CmsObject cms, CmsWorkflow workflow, CmsPublishOptions options)
I_CmsWorkflowManager
cms
- the user cms contextworkflow
- the workflowoptions
- the resource optionsI_CmsWorkflowManager.getWorkflowResources(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsWorkflow, org.opencms.ade.publish.shared.CmsPublishOptions)
public java.util.Map<java.lang.String,CmsWorkflow> getWorkflows(CmsObject cms)
I_CmsWorkflowManager
cms
- the user cms contextI_CmsWorkflowManager.getWorkflows(org.opencms.file.CmsObject)
public void initialize(CmsObject adminCms)
I_CmsWorkflowManager
initialize
在接口中 I_CmsWorkflowManager
initialize
在类中 A_CmsWorkflowManager
adminCms
- 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