Interface WorkflowPermission


public interface WorkflowPermission
Interface providing methods to define workflow permissions
Since:
3.0
See Also:
  • Method Details

    • getWorkflow

      @Nullable @Nullable Workflow 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

      void forbidUser(User user)
      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

      void allowUser(User user)
      Allow the given user to execute the workflow.
      Parameters:
      user - The user who should be allowed to execute the workflow.
      Since:
      3.0
    • forbidGroup

      void forbidGroup(Group group)
      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

      void allowGroup(Group group)
      Allow the given group to execute the workflow.
      Parameters:
      group - The group that should be allowed to execute the workflow.
      Since:
      3.0
    • setAllowedUsers

      void setAllowedUsers(User[] users)
      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

      void setAllowedGroups(Group[] groups)
      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

      WorkflowTransitionPermission getTransitionPermission(Transition transition)
      Get all permissions for the given transition. Creates a new WorkflowTransitionPermission if no permissions are defined yet for the given transition.
      Parameters:
      transition - The transition for which the permissions should be determined.
      Since:
      3.0
    • setTransitionPermissions

      void setTransitionPermissions(WorkflowTransitionPermission[] permissions)
      Set several permission for the workflow transitions.
      Parameters:
      permissions - The permissions that should be set for the workflow transitions.
      Since:
      3.0
    • removeTransitionPermission

      void removeTransitionPermission(Transition transition)
      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

      boolean isUserAllowed(User user)
      Check if the given user is allowed to execute the workflow.
      Parameters:
      user - boolean: true if the given user is allowed to execute the workflow, false if it is forbidden
      Since:
      3.0
    • useReleasePermission

      boolean useReleasePermission()
      The definition if the release permission should be used.
      • true: the permission should be used
      • false: 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: true if the release permission should be used, {code false} otherwise
      Since:
      3.0