Interface SubTaskManager

All Known Implementing Classes:
DefaultSubTaskManager, MockSubTaskManager

@PublicApi public interface SubTaskManager
Manages SubTasks - issues that are "part of" other issues.
  • Field Details

  • Method Details

    • enableSubTasks

      void enableSubTasks() throws CreateException
      Enables sub-tasks on the instance. If there are no sub-task issue types present, then the default sub-task issue type will be created.
      Throws:
      CreateException - if the default sub-task issue type creation failed.
    • enableSubTasks

      void enableSubTasks(boolean createDefaultIfMissing) throws CreateException
      Enables sub-tasks on the instance.
      Parameters:
      createDefaultIfMissing - if true and there are no sub-task issue types present, then the default sub-task issue type will be created.
      Throws:
      CreateException - if the default sub-task issue type creation failed.
    • isSubTasksEnabled

      boolean isSubTasksEnabled()
    • disableSubTasks

      void disableSubTasks()
    • isSubTask

      boolean isSubTask(Issue issue)
      Return true if the given issue is a subtask.
      Parameters:
      issue - the issue
      Returns:
      true if the given issue is a subtask.
    • getParentIssueId

      @Nullable Long getParentIssueId(org.ofbiz.core.entity.GenericValue issue)
      Deprecated.
      Use getParentIssueId(Issue) instead. Since v6.4.
      Returns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.
      Parameters:
      issue - the issue
      Returns:
      the parent issue ID of this the given issue, or null.
    • getParentIssueId

      @Nullable Long getParentIssueId(Issue issue)
      Returns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.
      Parameters:
      issue - the issue
      Returns:
      the parent issue ID of this the given issue, or null.
      See Also:
    • getParentIssueId

      @Nullable Long getParentIssueId(Long issueId)
      Returns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.
      Parameters:
      issueId - the issue ID of the subtask
      Returns:
      the parent issue ID of this the given issue, or null.
      See Also:
    • getSubTaskBean

      SubTaskBean getSubTaskBean(Issue issue, ApplicationUser remoteUser)
      Returns the SubTaskBean for the given parent issue in the context of the given user.
      Parameters:
      issue - the Issue
      remoteUser - the user
      Returns:
      the SubTaskBean for the given parent issue in the context of the given user.
    • moveSubTask

      void moveSubTask(Issue issue, Long currentSequence, Long sequence)
    • resetSequences

      void resetSequences(Issue issue)
    • insertSubTaskIssueType

      IssueType insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId) throws CreateException
      Create new issue type and adds it to default scheme.
      Throws:
      CreateException
      Since:
      v6.3
    • updateSubTaskIssueType

      void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId) throws DataAccessException
      Update existing sub-task issue type.
      Throws:
      DataAccessException
      Since:
      v6.3
    • removeSubTaskIssueType

      void removeSubTaskIssueType(String name) throws RemoveException
      Throws:
      RemoveException
    • getSubTaskIssueTypeObjects

      Collection<IssueType> getSubTaskIssueTypeObjects()
      Retrieves all the sub-task issue types
      Returns:
      A Collection of all sub-task IssueTypes.
      Since:
      4.1
    • issueTypeExistsById

      boolean issueTypeExistsById(String id)
    • issueTypeExistsByName

      boolean issueTypeExistsByName(String name)
    • moveSubTaskIssueTypeUp

      void moveSubTaskIssueTypeUp(String id) throws DataAccessException
      Throws:
      DataAccessException
    • moveSubTaskIssueTypeDown

      void moveSubTaskIssueTypeDown(String id) throws DataAccessException
      Throws:
      DataAccessException
    • getSubTaskIssueTypeById

      IssueType getSubTaskIssueTypeById(String id)
      Deprecated.
      Use getSubTaskIssueType(String) instead. Since v5.0.
      Returns the SubTask IssueType with the given ID.
      Parameters:
      id - the ID
      Returns:
      SubTask IssueType with the given ID.
    • getSubTaskIssueType

      IssueType getSubTaskIssueType(String id)
      Returns the SubTask IssueType with the given ID.
      Parameters:
      id - the ID
      Returns:
      SubTask IssueType with the given ID.
    • createSubTaskIssueLink

      void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) throws CreateException
      Throws:
      CreateException
    • getAllSubTaskIssueIds

      Collection<Long> getAllSubTaskIssueIds()
    • getSubTaskIssueLinks

      List<IssueLink> getSubTaskIssueLinks(Long issueId)
      Returns a list of issue links associated with the issue
      Parameters:
      issueId - issue id
      Returns:
      a list of issue links
    • getSubTaskObjects

      Collection<Issue> getSubTaskObjects(Issue issue)
    • getVisibleSubTaskObjects

      Collection<Issue> getVisibleSubTaskObjects(Issue issue, ApplicationUser currentUser)
      Returns a collection of subtask issues for the given parent issue that are visible to the given user. Visibility is determined by checking if the user has BROWSE permission for each subtask.
      Parameters:
      issue - the parent issue to get the subtasks for
      currentUser - the user to check permissions for
      Returns:
      a collection of subtask issues that are visible to the given user
    • changeParent

      IssueUpdateBean changeParent(Issue subTask, Issue parentIssue, ApplicationUser currentUser) throws RemoveException, CreateException
      Change the parent of the given subtask to the given new parent on behalf of the given user.
      Parameters:
      subTask - The SubTask
      parentIssue - The parent Issue
      currentUser - The user
      Returns:
      an IssueUpdateBean representing the change action.
      Throws:
      RemoveException - if there's a problem unlinking original parent.
      CreateException - if there's a problem linking new parent.