public interface WorkflowPermission
StoreElement.getWorkflowPermission(Workflow)
Modifier and Type | Method and Description |
---|---|
void |
allowGroup(Group group)
Allow the given group to execute the workflow.
|
void |
allowUser(User user)
Allow the given user to execute the workflow.
|
boolean |
allWorkflows()
Indicates whether the permission is applicable for all workflows.
|
void |
forbidGroup(Group group)
Forbid the given group to execute the workflow.
|
void |
forbidUser(User user)
Forbid the given user to execute the workflow.
|
Group[] |
getAllowedGroups()
Get all groups which users are allowed to execute the workflow.
|
User[] |
getAllowedUsers()
Get all users which are allowed to execute the workflow.
|
WorkflowTransitionPermission |
getTransitionPermission(Transition transition)
Get all permissions for the given transition.
|
WorkflowTransitionPermission[] |
getTransitionPermissions()
Get the permissions for all transitions of the workflow.
|
Workflow |
getWorkflow()
Gets the workflow.
|
boolean |
isUserAllowed(User user)
Check if the given user is allowed to execute the workflow.
|
void |
removeAllTransitionPermissions()
Remove the permissions for all transitions of the workflow.
|
void |
removeTransitionPermission(Transition transition)
Remove the permissions for the given transition.
|
void |
setAllowedGroups(Group[] groups)
Set several groups that should be allowed to execute the workflow.
|
void |
setAllowedUsers(User[] users)
Set several user that should be allowed to execute the workflow.
|
void |
setTransitionPermissions(WorkflowTransitionPermission[] permissions)
Set several permission for the workflow transitions.
|
void |
setUseReleasePermission(boolean use)
Define if the release permission should be used.
|
boolean |
useReleasePermission()
The definition if the release permission should be used.
|
Workflow getWorkflow()
boolean allWorkflows()
true
, if applicable for all workflows.User[] getAllowedUsers()
Group[] getAllowedGroups()
void forbidUser(User user)
user
- The user who shouldn't be allowed to execute the workflow.void allowUser(User user)
user
- The user who should be allowed to execute the workflow.void forbidGroup(Group group)
group
- The group that should not be allowed to execute the workflow.void allowGroup(Group group)
group
- The group that should be allowed to execute the workflow.void setAllowedUsers(User[] users)
users
- The users that should be allowed to execute the workflow.void setAllowedGroups(Group[] groups)
groups
- The groups that should be allowed to execute the workflow.WorkflowTransitionPermission[] getTransitionPermissions()
WorkflowTransitionPermission getTransitionPermission(Transition transition)
transition
- The transition for which the permissions should be determined.void setTransitionPermissions(WorkflowTransitionPermission[] permissions)
permissions
- The permissions that should be set for the workflow transitions.void removeTransitionPermission(Transition transition)
transition
- The given transition for which the permissions should be removed.void removeAllTransitionPermissions()
boolean isUserAllowed(User user)
user
- boolean: true
if the given user is allowed to execute the workflow, false
if it is forbiddenboolean useReleasePermission()
true
: the permission should be usedfalse
: the permission should not be used.void setUseReleasePermission(boolean use)
use
- boolean: true
if the release permission should be used, {code false} otherwiseCopyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210