|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.content.workflow.WorkflowManager
public class WorkflowManager
The default implementation for IWorkflowManager.
IWorkflowManager
Field Summary | |
---|---|
protected static int |
SCOPE_ALL
|
protected static int |
SCOPE_ASSIGNED_TO
|
Fields inherited from interface lumis.content.workflow.IWorkflowManager |
---|
ASSIGNED_TO_KEEP_SAME_VALUE |
Constructor Summary | |
---|---|
WorkflowManager()
|
Method Summary | |
---|---|
boolean |
autoArchivePublishedContent(String metaDataId,
ITransaction transaction)
Used for the automatic content archiving process. |
boolean |
contentMayBePublished(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
|
void |
createNewContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String assignedTo,
ITransaction transaction)
Creates the content workflow metadata for a new content. |
void |
deleteAllContentWorkflowMetaData(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Deletes all the workflow metadata that is assocated to a specified service instance. |
void |
deleteContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deletes the content workflow metadata of the given content. |
void |
destroyServiceInstanceWorkflow(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Destroys the service instance workflow, so that the service instance can be correctly removed. |
void |
executeAction(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String performedTransitionId,
String newAssignedTo,
ITransaction transaction)
Executes an action on a content's workflow. |
Collection<WorkflowStateConfig> |
getAccessibleStates(SessionConfig sessionConfig,
String serviceInstanceId,
boolean includeScopeAll,
boolean includeScopeAssignedTo,
ITransaction transaction)
Returns a collection of workflow's accessible states. |
Collection<WorkflowTransitionConfig> |
getAccessibleTransitions(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Returns the transitions that are accessible by the sessionConfig 's user for a specified content. |
Collection<WorkflowConfig> |
getAllWorkflows(SessionConfig sessionConfig,
ITransaction transaction)
Returns all registered workflows. |
ContentWorkflowMetaData |
getContentWorkflowMetaData(SessionConfig sessionConfig,
String metaDataId,
ITransaction transaction)
Returns the content workflow metadata for a metadata id. |
ContentWorkflowMetaData |
getContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Returns the content workflow metadata for a content. |
Collection<String> |
getPossibleAssignedToForAction(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String transitionId,
ITransaction transaction)
Returns the possible assignedTo values for a workflow transition. |
protected Collection<String> |
getPrincipalRoles(SessionConfig sessionConfig,
String serviceInstanceId,
String principalId,
ITransaction transaction)
|
WorkflowConfig |
getServiceInstanceWorkflow(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Returns the workflow of a service instance. |
WorkflowStateConfig |
getState(SessionConfig sessionConfig,
String workflowId,
String stateId,
ITransaction transaction)
Returns a workflow state. |
WorkflowTransitionConfig |
getTransition(SessionConfig sessionConfig,
String workflowId,
String transitionId,
ITransaction transaction)
Returns a workflow transition. |
List<WorkflowTransitionConfig> |
getTransitionsByStateId(SessionConfig sessionConfig,
String workflowId,
String stateId,
ITransaction transaction)
Returns the transitions for a workflow state. |
WorkflowConfig |
getWorkflow(SessionConfig sessionConfig,
String workflowId,
ITransaction transaction)
Returns a workflow. |
Collection<WorkflowPermission> |
getWorkflowPermissions(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Returns the permissions set for a workflow in a service instance. |
protected WorkflowConfig |
getWorkflowToRegister(SessionConfig sessionConfig,
String workflowConfigPath,
ITransaction transaction)
Returns the WorkflowConfig instance to save in the register. |
boolean |
hasEditPermission(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Returns true if the sessionConfig's user has edit permission to the specified item, according to the workflow's definition, state and assigned to. |
protected boolean |
hasPermission(SessionConfig sessionConfig,
Collection<String> roles,
lumis.content.workflow.IPermissionable permissionable,
boolean useScopeAll,
boolean useScopeAssignedTo,
ITransaction transaction)
Checks if any of the roles have permission to the specified workflow resource. |
protected boolean |
hasPermission(SessionConfig sessionConfig,
String principalId,
lumis.content.workflow.IPermissionable permissionable,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Checks if any of the principal have permission to the specified workflow resource. |
void |
register(SessionConfig sessionConfig,
String workflowConfigPath,
ITransaction transaction)
Register a workflow. |
void |
setServiceInstanceWorkflow(SessionConfig sessionConfig,
String serviceInstanceId,
String workflowId,
ITransaction transaction)
Sets the workflow to be used in a service instance. |
void |
setWorkflowPermissions(SessionConfig sessionConfig,
String serviceInstanceId,
Collection<WorkflowPermission> permissions,
ITransaction transaction)
Updates the workflow permissions in a service instance. |
void |
unregister(SessionConfig sessionConfig,
String workflowId,
ITransaction transaction)
Removes a workflow from the register. |
void |
updateRegister(SessionConfig sessionConfig,
String workflowId,
ITransaction transaction)
Updates the register of a workflow. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int SCOPE_ALL
protected static final int SCOPE_ASSIGNED_TO
Constructor Detail |
---|
public WorkflowManager()
Method Detail |
---|
protected WorkflowConfig getWorkflowToRegister(SessionConfig sessionConfig, String workflowConfigPath, ITransaction transaction) throws ManagerException, PortalException
WorkflowConfig
instance to save in the register.
sessionConfig
- the user session information.workflowConfigPath
- workflow configuration path.transaction
- the transaction for persistence access.
WorkflowConfig
instance to save in the register.
ManagerException
PortalException
public void register(SessionConfig sessionConfig, String workflowConfigPath, ITransaction transaction) throws ManagerException, PortalException
register
in interface IWorkflowManager
sessionConfig
- the user session information.workflowConfigPath
- the path, relative to the definition directory,
to the directory with the workflow's definition.transaction
- the transaction for persistence access.
ManagerException
PortalException
public void updateRegister(SessionConfig sessionConfig, String workflowId, ITransaction transaction) throws ManagerException, PortalException
updateRegister
in interface IWorkflowManager
sessionConfig
- the user session information.workflowId
- the workflow id.transaction
- the transaction for persistence access.
ManagerException
PortalException
public void unregister(SessionConfig sessionConfig, String workflowId, ITransaction transaction) throws PortalException
IWorkflowManager
unregister
in interface IWorkflowManager
sessionConfig
- the user session information.workflowId
- the workflow's identifier.transaction
- the transaction for persistence access.
PortalException
public Collection<WorkflowConfig> getAllWorkflows(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
IWorkflowManager
getAllWorkflows
in interface IWorkflowManager
sessionConfig
- the user session information.transaction
- the transaction for persistence access.
PortalException
public WorkflowConfig getWorkflow(SessionConfig sessionConfig, String workflowId, ITransaction transaction) throws PortalException
IWorkflowManager
getWorkflow
in interface IWorkflowManager
sessionConfig
- the user session information.workflowId
- the workflow's identifier.transaction
- the transaction for persistence access.
PortalException
public List<WorkflowTransitionConfig> getTransitionsByStateId(SessionConfig sessionConfig, String workflowId, String stateId, ITransaction transaction) throws PortalException
IWorkflowManager
getTransitionsByStateId
in interface IWorkflowManager
sessionConfig
- the user session information.workflowId
- the identifier of the state's workflow.stateId
- the state's identifier.transaction
- the transaction for persistence access.
PortalException
protected boolean hasPermission(SessionConfig sessionConfig, Collection<String> roles, lumis.content.workflow.IPermissionable permissionable, boolean useScopeAll, boolean useScopeAssignedTo, ITransaction transaction) throws PortalException
sessionConfig
- the current session information.roles
- a collection with the roles ids.permissionable
- a permissionable workflow resource.useScopeAll
- if the scope='all' permissions will be used to verify permission.useScopeAssignedTo
- if the scope='assignedTo' permissions will be used to verify permission.transaction
- the transaction for persistence access.
PortalException
protected Collection<String> getPrincipalRoles(SessionConfig sessionConfig, String serviceInstanceId, String principalId, ITransaction transaction) throws PortalException
PortalException
protected boolean hasPermission(SessionConfig sessionConfig, String principalId, lumis.content.workflow.IPermissionable permissionable, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
sessionConfig
- the current session information.principalId
- the principal id.permissionable
- a permissionable workflow resource.itemId
- the content item id. If null, the scope='assignedTo' allow permissions are ignored.serviceInstanceId
- the content service instance id.transaction
- the transaction for persistence access.
PortalException
public Collection<WorkflowTransitionConfig> getAccessibleTransitions(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
IWorkflowManager
sessionConfig
's user for a specified content.
getAccessibleTransitions
in interface IWorkflowManager
sessionConfig
- the user session information.itemId
- the content's itemId.serviceInstanceId
- the content's service instance identifier.sourceId
- the content's source identifier.transaction
- the transaction for persistence access.
PortalException
public Collection<WorkflowStateConfig> getAccessibleStates(SessionConfig sessionConfig, String serviceInstanceId, boolean includeScopeAll, boolean includeScopeAssignedTo, ITransaction transaction) throws PortalException
IWorkflowManager
getAccessibleStates
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the content service instance id.includeScopeAll
- if the states with permission scope all are to be included.includeScopeAssignedTo
- if the states with permission scope assigned to are to be included.transaction
- the transaction for persistence acecess.
PortalException
public WorkflowStateConfig getState(SessionConfig sessionConfig, String workflowId, String stateId, ITransaction transaction) throws PortalException
IWorkflowManager
getState
in interface IWorkflowManager
sessionConfig
- the user session information.workflowId
- the identifier of the state's workflow.stateId
- the state's identifier.transaction
- the transaction for persistence access.
PortalException
public WorkflowTransitionConfig getTransition(SessionConfig sessionConfig, String workflowId, String transitionId, ITransaction transaction) throws PortalException
IWorkflowManager
getTransition
in interface IWorkflowManager
sessionConfig
- the user session information.workflowId
- the identifier of the state's workflow.transitionId
- the transition's identifier.transaction
- the transaction for persistence access.
PortalException
public WorkflowConfig getServiceInstanceWorkflow(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
IWorkflowManager
getServiceInstanceWorkflow
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.transaction
- the transaction for persistence access.
PortalException
public void setServiceInstanceWorkflow(SessionConfig sessionConfig, String serviceInstanceId, String workflowId, ITransaction transaction) throws PortalException
IWorkflowManager
setServiceInstanceWorkflow
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.workflowId
- the workflow's id.transaction
- the transaction for persistence access.
PortalException
public void destroyServiceInstanceWorkflow(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
IWorkflowManager
destroyServiceInstanceWorkflow
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.transaction
- the transaction for persistence access.
PortalException
public void deleteAllContentWorkflowMetaData(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
IWorkflowManager
deleteAllContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- the user session information.serviceInstanceId
- the service instance identifier.transaction
- the transaction for persistence access.
PortalException
public Collection<WorkflowPermission> getWorkflowPermissions(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
IWorkflowManager
getWorkflowPermissions
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.transaction
- the transaction for persistence access.
PortalException
public void setWorkflowPermissions(SessionConfig sessionConfig, String serviceInstanceId, Collection<WorkflowPermission> permissions, ITransaction transaction) throws PortalException
IWorkflowManager
setWorkflowPermissions
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.permissions
- the set of permissions to be set in the service instance. All
previous permissions will be deleted.transaction
- the transaction for persistence access.
PortalException
public ContentWorkflowMetaData getContentWorkflowMetaData(SessionConfig sessionConfig, String metaDataId, ITransaction transaction) throws PortalException
IWorkflowManager
getContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- user session information.metaDataId
- the metadata's id.transaction
- the transaction for persistence access.
PortalException
public ContentWorkflowMetaData getContentWorkflowMetaData(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
IWorkflowManager
getContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.
PortalException
public void createNewContentWorkflowMetaData(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, String assignedTo, ITransaction transaction) throws PortalException
IWorkflowManager
createNewContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.
PortalException
public void deleteContentWorkflowMetaData(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
IWorkflowManager
deleteContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.
PortalException
public void executeAction(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, String performedTransitionId, String newAssignedTo, ITransaction transaction) throws PortalException
IWorkflowManager
executeAction
in interface IWorkflowManager
sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.performedTransitionId
- the transition action performed. If null, no transition is
performed.newAssignedTo
- the new assigned to principal id.transaction
- the transaction for persistence access.
PortalException
public boolean hasEditPermission(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
IWorkflowManager
If there is no workflow, or no content workflow metadata, true is returned.
hasEditPermission
in interface IWorkflowManager
sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.
PortalException
public Collection<String> getPossibleAssignedToForAction(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, String transitionId, ITransaction transaction) throws PortalException
IWorkflowManager
getPossibleAssignedToForAction
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transitionId
- the workflow's transition id.transaction
- the transaction for persistence access.
PortalException
public boolean contentMayBePublished(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
contentMayBePublished
in interface IWorkflowManager
sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.
PortalException
public boolean autoArchivePublishedContent(String metaDataId, ITransaction transaction) throws PortalException
IWorkflowManager
autoArchivePublishedContent
in interface IWorkflowManager
metaDataId
- the content's metadata id.transaction
- the transaction for persistence access.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |