|
||||||||||
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(ContentLocale contentLocale,
ITransaction transaction)
Used for the automatic content archiving process. |
boolean |
contentMayBePublished(SessionConfig sessionConfig,
ContentLocale contentLocale,
ITransaction transaction)
Indicates if a content version may be published according to its workflow state. |
boolean |
contentMayBePublished(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated. |
void |
createNewContentWorkflowMetaData(SessionConfig sessionConfig,
ContentLocale contentLocale,
String assignedTo,
ITransaction transaction)
Creates a new content workflow metadata for a content locale. |
void |
createNewContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String assignedTo,
ITransaction transaction)
Deprecated. |
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,
ContentLocale contentLocale,
ITransaction transaction)
Deletes the content workflow metadata of the given content locale. |
void |
deleteContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated. |
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,
ContentLocale contentLocale,
String performedTransitionId,
String newAssignedTo,
ITransaction transaction)
Executes an action on a content's workflow. |
void |
executeAction(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String performedTransitionId,
String newAssignedTo,
ITransaction transaction)
Deprecated. |
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,
ContentLocale contentLocale,
ITransaction transaction)
Returns the transitions that are accessible by the sessionConfig 's user for a specified contentLocale. |
Collection<WorkflowTransitionConfig> |
getAccessibleTransitions(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated. |
Collection<WorkflowTransitionConfig> |
getAccessibleTransitions(SessionConfig sessionConfig,
WorkflowStateConfig state,
String serviceInstanceId,
boolean includeScopeAssignedTo,
ITransaction transaction)
Returns the transitions that are accessible by the sessionConfig 's user, originating from a specific workflow
state in the specified service instance. |
Collection<WorkflowConfig> |
getAllWorkflows(SessionConfig sessionConfig,
ITransaction transaction)
Returns all registered workflows. |
ContentWorkflowMetaData |
getContentWorkflowMetaData(SessionConfig sessionConfig,
ContentLocale contentLocale,
ITransaction transaction)
Returns the content workflow metadata for a content locale. |
ContentWorkflowMetaData |
getContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated. |
Collection<String> |
getPossibleAssignedTo(SessionConfig sessionConfig,
String serviceInstanceId,
WorkflowStateConfig workflowState,
ITransaction transaction)
Returns the possible assignedTo values for a workflow state. |
Collection<String> |
getPossibleAssignedToForAction(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String transitionId,
ITransaction transaction)
Deprecated. |
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,
ContentLocale contentLocale,
ITransaction transaction)
Returns true if the sessionConfig's user has edit permission to the specified content, according to the workflow's definition, state and assigned to. |
boolean |
hasEditPermission(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated. |
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,
ContentLocale contentLocale,
String serviceInstanceId,
ITransaction transaction)
Checks if any of the principal 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)
Deprecated. Since 4.2.0, replaced by hasPermission(SessionConfig, String, IPermissionable, ContentLocale, String, ITransaction) |
void |
register(SessionConfig sessionConfig,
String workflowConfigPath,
ITransaction transaction)
Register a workflow. |
void |
removeWorkflowPermissionsWithoutAcl()
Removes all workflow permissions entries where there does not exist an ACL entry for the same principal in the same service instance. |
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
@Deprecated protected boolean hasPermission(SessionConfig sessionConfig, String principalId, lumis.content.workflow.IPermissionable permissionable, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
hasPermission(SessionConfig, String, IPermissionable, ContentLocale, String, ITransaction)
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
protected boolean hasPermission(SessionConfig sessionConfig, String principalId, lumis.content.workflow.IPermissionable permissionable, ContentLocale contentLocale, String serviceInstanceId, ITransaction transaction) throws PortalException
sessionConfig
- the current session information.principalId
- the principal id.permissionable
- a permissionable workflow resource.contentLocale
- the content locale specific object. If null,
assignedTo scoped permissions will be ignored.serviceInstanceId
- the content service instance id.transaction
- the transaction for persistence access.
PortalException
@Deprecated 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<WorkflowTransitionConfig> getAccessibleTransitions(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
IWorkflowManager
sessionConfig
's user for a specified contentLocale.
getAccessibleTransitions
in interface IWorkflowManager
sessionConfig
- the user session information.contentLocale
- the contentLocale.transaction
- the transaction for persistence access.
PortalException
public Collection<WorkflowTransitionConfig> getAccessibleTransitions(SessionConfig sessionConfig, WorkflowStateConfig state, String serviceInstanceId, boolean includeScopeAssignedTo, ITransaction transaction) throws PortalException
IWorkflowManager
sessionConfig
's user, originating from a specific workflow
state in the specified service instance.
getAccessibleTransitions
in interface IWorkflowManager
sessionConfig
- the user session information.state
- the transition state origin.serviceInstanceId
- the service instance identifier.includeScopeAssignedTo
- if true, transitions that the user
has permission to access only when the content is assigned to him are
also included in the returned collection.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 access.
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, ContentLocale contentLocale, ITransaction transaction) throws PortalException
IWorkflowManager
getContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- user session information.contentLocale
- the content locale-specific object.transaction
- the transaction for persistence access.
PortalException
@Deprecated 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
@Deprecated 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.assignedTo
- the principal identifier to be assigned to.transaction
- the transaction for persistence access.
PortalException
public void createNewContentWorkflowMetaData(SessionConfig sessionConfig, ContentLocale contentLocale, String assignedTo, ITransaction transaction) throws PortalException
IWorkflowManager
createNewContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- user session information.contentLocale
- the content locale.assignedTo
- the principal identifier to be assigned to.transaction
- the transaction for persistence access.
PortalException
@Deprecated 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 deleteContentWorkflowMetaData(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
IWorkflowManager
deleteContentWorkflowMetaData
in interface IWorkflowManager
sessionConfig
- user session information.contentLocale
- the content locale.transaction
- the transaction for persistence access.
PortalException
@Deprecated 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 void executeAction(SessionConfig sessionConfig, ContentLocale contentLocale, String performedTransitionId, String newAssignedTo, ITransaction transaction) throws PortalException
IWorkflowManager
executeAction
in interface IWorkflowManager
sessionConfig
- user session information.contentLocale
- the content locale specific object.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
@Deprecated 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 boolean hasEditPermission(SessionConfig sessionConfig, ContentLocale contentLocale, 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.contentLocale
- the content.transaction
- the transaction for persistence access.
PortalException
@Deprecated 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 Collection<String> getPossibleAssignedTo(SessionConfig sessionConfig, String serviceInstanceId, WorkflowStateConfig workflowState, ITransaction transaction) throws PortalException
IWorkflowManager
getPossibleAssignedTo
in interface IWorkflowManager
sessionConfig
- user session information.serviceInstanceId
- the service instance identifier.workflowState
- the workflow's state.transaction
- the transaction for persistence access.
PortalException
@Deprecated 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 contentMayBePublished(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
IWorkflowManager
contentMayBePublished
in interface IWorkflowManager
sessionConfig
- user session information.contentLocale
- the content version.transaction
- the transaction for persistence access.
PortalException
public boolean autoArchivePublishedContent(ContentLocale contentLocale, ITransaction transaction) throws PortalException
IWorkflowManager
If the given content version is not in a published state or is already in an archived state or is not after its publishing period then nothing is done.
autoArchivePublishedContent
in interface IWorkflowManager
contentLocale
- the content version.transaction
- the transaction for persistence access.
PortalException
public void removeWorkflowPermissionsWithoutAcl() throws PortalException
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |