Package com.atlassian.jira.config
Class MockSubTaskManager
java.lang.Object
com.atlassian.jira.config.MockSubTaskManager
- All Implemented Interfaces:
SubTaskManager
- Since:
- v4.0
-
Field Summary
Fields inherited from interface com.atlassian.jira.config.SubTaskManager
SUB_TASK_ISSUE_TYPE_STYLE, SUB_TASK_LINK_TYPE_INWARD_NAME, SUB_TASK_LINK_TYPE_NAME, SUB_TASK_LINK_TYPE_OUTWARD_NAME, SUB_TASK_LINK_TYPE_STYLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchangeParent(Issue subTask, Issue parentIssue, ApplicationUser currentUser) Change the parent of the given subtask to the given new parent on behalf of the given user.voidcreateSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) voidvoidEnables sub-tasks on the instance.voidenableSubTasks(boolean createDefaultIfMissing) Enables sub-tasks on the instance.getParentIssueId(Issue issue) Returns the parent issue ID of this the given issue.getParentIssueId(Long issue) Returns the parent issue ID of this the given issue.getParentIssueId(org.ofbiz.core.entity.GenericValue issue) Returns the parent issue ID of this the given issue.getSubTaskBean(Issue issue, ApplicationUser remoteUser) Returns the SubTaskBean for the given parent issue in the context of the given user.getSubTaskIssueLinks(Long issueId) Returns a list of issue links associated with the issueReturns the SubTask IssueType with the given ID.Returns the SubTask IssueType with the given ID.Retrieves all the sub-task issue typesgetSubTaskObjects(Issue issue) getVisibleSubTaskObjects(Issue issue, ApplicationUser currentUser) Returns a collection of subtask issues for the given parent issue that are visible to the given user.insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId) Create new issue type and adds it to default scheme.booleanReturn true if the given issue is a subtask.booleanbooleanbooleanissueTypeExistsByName(String name) voidmoveSubTask(Issue issue, Long currentSequence, Long sequence) voidvoidvoidremoveSubTaskIssueType(String name) voidresetSequences(Issue issue) voidUpdate existing sub-task issue type.
-
Constructor Details
-
MockSubTaskManager
public MockSubTaskManager()
-
-
Method Details
-
enableSubTasks
Description copied from interface:SubTaskManagerEnables sub-tasks on the instance. If there are no sub-task issue types present, then the default sub-task issue type will be created.- Specified by:
enableSubTasksin interfaceSubTaskManager- Throws:
CreateException- if the default sub-task issue type creation failed.
-
enableSubTasks
Description copied from interface:SubTaskManagerEnables sub-tasks on the instance.- Specified by:
enableSubTasksin interfaceSubTaskManager- Parameters:
createDefaultIfMissing- iftrueand 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
public boolean isSubTasksEnabled()- Specified by:
isSubTasksEnabledin interfaceSubTaskManager
-
disableSubTasks
public void disableSubTasks()- Specified by:
disableSubTasksin interfaceSubTaskManager
-
isSubTask
Description copied from interface:SubTaskManagerReturn true if the given issue is a subtask.- Specified by:
isSubTaskin interfaceSubTaskManager- Parameters:
issue- the issue- Returns:
- true if the given issue is a subtask.
-
getParentIssueId
Description copied from interface:SubTaskManagerReturns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.- Specified by:
getParentIssueIdin interfaceSubTaskManager- Parameters:
issue- the issue- Returns:
- the parent issue ID of this the given issue, or null.
-
getParentIssueId
Description copied from interface:SubTaskManagerReturns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.- Specified by:
getParentIssueIdin interfaceSubTaskManager- Parameters:
issue- the issue- Returns:
- the parent issue ID of this the given issue, or null.
- See Also:
-
getParentIssueId
Description copied from interface:SubTaskManagerReturns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.- Specified by:
getParentIssueIdin interfaceSubTaskManager- Parameters:
issue- the issue ID of the subtask- Returns:
- the parent issue ID of this the given issue, or null.
- See Also:
-
getSubTaskBean
Description copied from interface:SubTaskManagerReturns the SubTaskBean for the given parent issue in the context of the given user.- Specified by:
getSubTaskBeanin interfaceSubTaskManager- Parameters:
issue- the IssueremoteUser- the user- Returns:
- the SubTaskBean for the given parent issue in the context of the given user.
-
moveSubTask
- Specified by:
moveSubTaskin interfaceSubTaskManager
-
resetSequences
- Specified by:
resetSequencesin interfaceSubTaskManager
-
insertSubTaskIssueType
public IssueType insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId) throws CreateException Description copied from interface:SubTaskManagerCreate new issue type and adds it to default scheme.- Specified by:
insertSubTaskIssueTypein interfaceSubTaskManager- Throws:
CreateException
-
updateSubTaskIssueType
public void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId) throws DataAccessException Description copied from interface:SubTaskManagerUpdate existing sub-task issue type.- Specified by:
updateSubTaskIssueTypein interfaceSubTaskManager- Throws:
DataAccessException
-
removeSubTaskIssueType
- Specified by:
removeSubTaskIssueTypein interfaceSubTaskManager- Throws:
RemoveException
-
getSubTaskIssueTypeObjects
Description copied from interface:SubTaskManagerRetrieves all the sub-task issue types- Specified by:
getSubTaskIssueTypeObjectsin interfaceSubTaskManager- Returns:
- A Collection of all sub-task
IssueTypes.
-
issueTypeExistsById
- Specified by:
issueTypeExistsByIdin interfaceSubTaskManager
-
issueTypeExistsByName
- Specified by:
issueTypeExistsByNamein interfaceSubTaskManager
-
moveSubTaskIssueTypeUp
- Specified by:
moveSubTaskIssueTypeUpin interfaceSubTaskManager
-
moveSubTaskIssueTypeDown
- Specified by:
moveSubTaskIssueTypeDownin interfaceSubTaskManager
-
getSubTaskIssueTypeById
Description copied from interface:SubTaskManagerReturns the SubTask IssueType with the given ID.- Specified by:
getSubTaskIssueTypeByIdin interfaceSubTaskManager- Parameters:
id- the ID- Returns:
- SubTask IssueType with the given ID.
-
getSubTaskIssueType
Description copied from interface:SubTaskManagerReturns the SubTask IssueType with the given ID.- Specified by:
getSubTaskIssueTypein interfaceSubTaskManager- Parameters:
id- the ID- Returns:
- SubTask IssueType with the given ID.
-
createSubTaskIssueLink
public void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) throws CreateException - Specified by:
createSubTaskIssueLinkin interfaceSubTaskManager- Throws:
CreateException
-
getAllSubTaskIssueIds
- Specified by:
getAllSubTaskIssueIdsin interfaceSubTaskManager
-
getSubTaskIssueLinks
Description copied from interface:SubTaskManagerReturns a list of issue links associated with the issue- Specified by:
getSubTaskIssueLinksin interfaceSubTaskManager- Parameters:
issueId- issue id- Returns:
- a list of issue links
-
getSubTaskObjects
- Specified by:
getSubTaskObjectsin interfaceSubTaskManager
-
getVisibleSubTaskObjects
Description copied from interface:SubTaskManagerReturns 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.- Specified by:
getVisibleSubTaskObjectsin interfaceSubTaskManager- Parameters:
issue- the parent issue to get the subtasks forcurrentUser- the user to check permissions for- Returns:
- a collection of subtask issues that are visible to the given user
-
changeParent
public IssueUpdateBean changeParent(Issue subTask, Issue parentIssue, ApplicationUser currentUser) throws RemoveException, CreateException Description copied from interface:SubTaskManagerChange the parent of the given subtask to the given new parent on behalf of the given user.- Specified by:
changeParentin interfaceSubTaskManager- Parameters:
subTask- The SubTaskparentIssue- The parent IssuecurrentUser- 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.
-