Interface WorkflowPermission
public interface WorkflowPermission
Interface providing methods to define workflow permissions
- Since:
- 3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidallowGroup(Group group) Allow the given group to execute the workflow.voidAllow the given user to execute the workflow.booleanIndicates whether the permission is applicable for all workflows.voidforbidGroup(Group group) Forbid the given group to execute the workflow.voidforbidUser(User user) Forbid the given user to execute the workflow.Group[]Get all groups which users are allowed to execute the workflow.User[]Get all users which are allowed to execute the workflow.getTransitionPermission(Transition transition) Get all permissions for the given transition.Get the permissions for all transitions of the workflow.@Nullable WorkflowGets the workflow.booleanisUserAllowed(User user) Check if the given user is allowed to execute the workflow.voidRemove the permissions for all transitions of the workflow.voidremoveTransitionPermission(Transition transition) Remove the permissions for the given transition.voidsetAllowedGroups(Group[] groups) Set several groups that should be allowed to execute the workflow.voidsetAllowedUsers(User[] users) Set several user that should be allowed to execute the workflow.voidsetTransitionPermissions(WorkflowTransitionPermission[] permissions) Set several permission for the workflow transitions.voidsetUseReleasePermission(boolean use) Define if the release permission should be used.booleanThe definition if the release permission should be used.
-
Method Details
-
getWorkflow
Gets the workflow.- Since:
- 3.0
-
allWorkflows
boolean allWorkflows()Indicates whether the permission is applicable for all workflows.- Returns:
true, if applicable for all workflows.- Since:
- 3.0
-
getAllowedUsers
User[] getAllowedUsers()Get all users which are allowed to execute the workflow.- Since:
- 3.0
-
getAllowedGroups
Group[] getAllowedGroups()Get all groups which users are allowed to execute the workflow.- Since:
- 3.0
-
forbidUser
Forbid the given user to execute the workflow.- Parameters:
user- The user who shouldn't be allowed to execute the workflow.- Since:
- 3.0
-
allowUser
Allow the given user to execute the workflow.- Parameters:
user- The user who should be allowed to execute the workflow.- Since:
- 3.0
-
forbidGroup
Forbid the given group to execute the workflow.- Parameters:
group- The group that should not be allowed to execute the workflow.- Since:
- 3.0
-
allowGroup
Allow the given group to execute the workflow.- Parameters:
group- The group that should be allowed to execute the workflow.- Since:
- 3.0
-
setAllowedUsers
Set several user that should be allowed to execute the workflow.- Parameters:
users- The users that should be allowed to execute the workflow.- Since:
- 3.0
-
setAllowedGroups
Set several groups that should be allowed to execute the workflow.- Parameters:
groups- The groups that should be allowed to execute the workflow.- Since:
- 3.0
-
getTransitionPermissions
WorkflowTransitionPermission[] getTransitionPermissions()Get the permissions for all transitions of the workflow.- Since:
- 3.0
-
getTransitionPermission
Get all permissions for the given transition. Creates a newWorkflowTransitionPermissionif no permissions are defined yet for the given transition.- Parameters:
transition- The transition for which the permissions should be determined.- Since:
- 3.0
-
setTransitionPermissions
Set several permission for the workflow transitions.- Parameters:
permissions- The permissions that should be set for the workflow transitions.- Since:
- 3.0
-
removeTransitionPermission
Remove the permissions for the given transition.- Parameters:
transition- The given transition for which the permissions should be removed.- Since:
- 3.0
-
removeAllTransitionPermissions
void removeAllTransitionPermissions()Remove the permissions for all transitions of the workflow.- Since:
- 3.0
-
isUserAllowed
Check if the given user is allowed to execute the workflow.- Parameters:
user- boolean:trueif the given user is allowed to execute the workflow,falseif it is forbidden- Since:
- 3.0
-
useReleasePermission
boolean useReleasePermission()The definition if the release permission should be used.true: the permission should be usedfalse: the permission should not be used
- Since:
- 3.0
-
setUseReleasePermission
void setUseReleasePermission(boolean use) Define if the release permission should be used.- Parameters:
use- boolean:trueif the release permission should be used, {code false} otherwise- Since:
- 3.0
-