public class

DefaultSubTaskManager

extends Object
implements SubTaskManager
java.lang.Object
   ↳ com.atlassian.jira.config.DefaultSubTaskManager

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.config.SubTaskManager
Public Constructors
DefaultSubTaskManager(ConstantsManager constantsManager, IssueLinkTypeManager issueLinkTypeManager, IssueLinkManager issueLinkManager, PermissionManager permissionManager, ApplicationProperties applicationProperties, IssueTypeSchemeManager issueTypeSchemeManager)
Public Methods
IssueUpdateBean changeParent(Issue subTask, Issue newParentIssue, ApplicationUser currentUser)
Change the parent of the given subtask to the given new parent on behalf of the given user.
void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser)
void disableSubTasks()
void enableSubTasks()
Turn on sub-tasks by creating a sub-task issue link type and a default sub-task issue type
void enableSubTasks(boolean createDefaultIfMissing)
Enables sub-tasks on the instance.
Collection<Long> getAllSubTaskIssueIds()
Retrieves ids of all sub-task issues in the system.
@Nullable Long getParentIssueId(GenericValue issue)
Returns the parent issue ID of this the given issue.
@Nullable Long getParentIssueId(Issue issue)
Returns the parent issue ID of this the given issue.
@Nullable Long getParentIssueId(Long issueId)
Returns the parent issue ID of this the given issue.
SubTaskBean getSubTaskBean(Issue issue, ApplicationUser remoteUser)
Returns the SubTaskBean for the given parent issue in the context of the given user.
List<IssueLink> getSubTaskIssueLinks(Long issueId)
Returns a list of issue links associated with the issue
IssueType getSubTaskIssueType(String id)
Returns the SubTask IssueType with the given ID.
IssueType getSubTaskIssueTypeById(String id)
Returns the SubTask IssueType with the given ID.
Collection<IssueType> getSubTaskIssueTypeObjects()
Retrieves all the sub-task issue types
Collection<Issue> getSubTaskObjects(Issue parentIssue)
Get an issue's subtasks.
IssueType insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId)
Create new issue type and adds it to default scheme.
IssueType insertSubTaskIssueType(String name, Long sequence, String description, String iconurl)
Create new issue type and adds it to default scheme.
boolean isSubTask(Issue issue)
Return true if the given issue is a subtask.
boolean isSubTasksEnabled()
boolean issueTypeExistsById(String id)
boolean issueTypeExistsByName(String name)
void moveSubTask(Issue parentIssue, Long currentSequence, Long sequence)
void moveSubTaskIssueTypeDown(String id)
void moveSubTaskIssueTypeUp(String id)
void removeSubTaskIssueType(String name)
void resetSequences(Issue issue)
void updateSubTaskIssueType(String id, String name, Long sequence, String description, String iconurl)
void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId)
Update existing sub-task issue type.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.config.SubTaskManager

Public Constructors

public DefaultSubTaskManager (ConstantsManager constantsManager, IssueLinkTypeManager issueLinkTypeManager, IssueLinkManager issueLinkManager, PermissionManager permissionManager, ApplicationProperties applicationProperties, IssueTypeSchemeManager issueTypeSchemeManager)

Public Methods

public IssueUpdateBean changeParent (Issue subTask, Issue newParentIssue, ApplicationUser currentUser)

Change the parent of the given subtask to the given new parent on behalf of the given user.

Parameters
subTask The SubTask
newParentIssue The parent Issue
currentUser The user
Returns
  • an IssueUpdateBean representing the change action.

public void createSubTaskIssueLink (Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser)

public void disableSubTasks ()

public void enableSubTasks ()

Turn on sub-tasks by creating a sub-task issue link type and a default sub-task issue type

public void enableSubTasks (boolean createDefaultIfMissing)

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.

public Collection<Long> getAllSubTaskIssueIds ()

Retrieves ids of all sub-task issues in the system.

@Nullable public Long getParentIssueId (GenericValue 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.

@Nullable public 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.

@Nullable public 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.

public 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.

public 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

public IssueType getSubTaskIssueType (String id)

Returns the SubTask IssueType with the given ID.

Parameters
id the ID
Returns
  • SubTask IssueType with the given ID.

public IssueType getSubTaskIssueTypeById (String id)

Returns the SubTask IssueType with the given ID.

Parameters
id the ID
Returns
  • SubTask IssueType with the given ID.

public Collection<IssueType> getSubTaskIssueTypeObjects ()

Retrieves all the sub-task issue types

Returns

public Collection<Issue> getSubTaskObjects (Issue parentIssue)

Get an issue's subtasks.

Returns

public IssueType insertSubTaskIssueType (String name, Long sequence, String description, Long avatarId)

Create new issue type and adds it to default scheme.

public IssueType insertSubTaskIssueType (String name, Long sequence, String description, String iconurl)

Create new issue type and adds it to default scheme.

public 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.

public boolean isSubTasksEnabled ()

public boolean issueTypeExistsById (String id)

public boolean issueTypeExistsByName (String name)

public void moveSubTask (Issue parentIssue, Long currentSequence, Long sequence)

public void moveSubTaskIssueTypeDown (String id)

public void moveSubTaskIssueTypeUp (String id)

public void removeSubTaskIssueType (String name)

public void resetSequences (Issue issue)

public void updateSubTaskIssueType (String id, String name, Long sequence, String description, String iconurl)

public void updateSubTaskIssueType (String id, String name, Long sequence, String description, Long avatarId)

Update existing sub-task issue type.