public class

MockSubTaskManager

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

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.config.SubTaskManager
Public Constructors
MockSubTaskManager()
Public Methods
IssueUpdateBean changeParent(Issue subTask, Issue parentIssue, 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()
Enables sub-tasks on the instance.
void enableSubTasks(boolean createDefaultIfMissing)
Enables sub-tasks on the instance.
Collection<Long> getAllSubTaskIssueIds()
Long getParentIssueId(GenericValue issue)
Returns the parent issue ID of this the given issue.
Long getParentIssueId(Issue issue)
Returns the parent issue ID of this the given issue.
Long getParentIssueId(Long issue)
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 issue)
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 issue, 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 MockSubTaskManager ()

Public Methods

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

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.

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

public void disableSubTasks ()

public void enableSubTasks ()

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.

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 ()

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.

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.

public Long getParentIssueId (Long 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 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 issue)

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 issue, 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.