public class MockSubTaskManager extends Object implements 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 and Description |
---|
MockSubTaskManager() |
Modifier and Type | Method and Description |
---|---|
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(org.ofbiz.core.entity.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,
Long avatarId)
Update existing sub-task issue type.
|
void |
updateSubTaskIssueType(String id,
String name,
Long sequence,
String description,
String iconurl) |
public void enableSubTasks() throws CreateException
SubTaskManager
enableSubTasks
in interface SubTaskManager
CreateException
- if the default sub-task issue type creation failed.public void enableSubTasks(boolean createDefaultIfMissing) throws CreateException
SubTaskManager
enableSubTasks
in interface SubTaskManager
createDefaultIfMissing
- if true
and there are no sub-task issue types present, then the default
sub-task issue type will be created.CreateException
- if the default sub-task issue type creation failed.public boolean isSubTasksEnabled()
isSubTasksEnabled
in interface SubTaskManager
public void disableSubTasks()
disableSubTasks
in interface SubTaskManager
public boolean isSubTask(Issue issue)
SubTaskManager
isSubTask
in interface SubTaskManager
issue
- the issuepublic Long getParentIssueId(org.ofbiz.core.entity.GenericValue issue)
SubTaskManager
getParentIssueId
in interface SubTaskManager
issue
- the issuepublic Long getParentIssueId(Issue issue)
SubTaskManager
getParentIssueId
in interface SubTaskManager
issue
- the issueSubTaskManager.getParentIssueId(Long)
public Long getParentIssueId(Long issue)
SubTaskManager
getParentIssueId
in interface SubTaskManager
issue
- the issue ID of the subtaskSubTaskManager.getParentIssueId(Issue)
public SubTaskBean getSubTaskBean(Issue issue, ApplicationUser remoteUser)
SubTaskManager
getSubTaskBean
in interface SubTaskManager
issue
- the IssueremoteUser
- the userpublic void moveSubTask(Issue issue, Long currentSequence, Long sequence)
moveSubTask
in interface SubTaskManager
public void resetSequences(Issue issue)
resetSequences
in interface SubTaskManager
public IssueType insertSubTaskIssueType(String name, Long sequence, String description, String iconurl) throws CreateException
SubTaskManager
insertSubTaskIssueType
in interface SubTaskManager
CreateException
public IssueType insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId) throws CreateException
SubTaskManager
insertSubTaskIssueType
in interface SubTaskManager
CreateException
public void updateSubTaskIssueType(String id, String name, Long sequence, String description, String iconurl)
updateSubTaskIssueType
in interface SubTaskManager
public void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId) throws DataAccessException
SubTaskManager
updateSubTaskIssueType
in interface SubTaskManager
DataAccessException
public void removeSubTaskIssueType(String name) throws RemoveException
removeSubTaskIssueType
in interface SubTaskManager
RemoveException
public Collection<IssueType> getSubTaskIssueTypeObjects()
SubTaskManager
getSubTaskIssueTypeObjects
in interface SubTaskManager
IssueType
s.public boolean issueTypeExistsById(String id)
issueTypeExistsById
in interface SubTaskManager
public boolean issueTypeExistsByName(String name)
issueTypeExistsByName
in interface SubTaskManager
public void moveSubTaskIssueTypeUp(String id)
moveSubTaskIssueTypeUp
in interface SubTaskManager
public void moveSubTaskIssueTypeDown(String id)
moveSubTaskIssueTypeDown
in interface SubTaskManager
public IssueType getSubTaskIssueTypeById(String id)
SubTaskManager
getSubTaskIssueTypeById
in interface SubTaskManager
id
- the IDpublic IssueType getSubTaskIssueType(String id)
SubTaskManager
getSubTaskIssueType
in interface SubTaskManager
id
- the IDpublic void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) throws CreateException
createSubTaskIssueLink
in interface SubTaskManager
CreateException
public Collection<Long> getAllSubTaskIssueIds()
getAllSubTaskIssueIds
in interface SubTaskManager
public List<IssueLink> getSubTaskIssueLinks(Long issueId)
SubTaskManager
getSubTaskIssueLinks
in interface SubTaskManager
issueId
- issue idpublic Collection<Issue> getSubTaskObjects(Issue issue)
getSubTaskObjects
in interface SubTaskManager
public IssueUpdateBean changeParent(Issue subTask, Issue parentIssue, ApplicationUser currentUser) throws RemoveException, CreateException
SubTaskManager
changeParent
in interface SubTaskManager
subTask
- The SubTaskparentIssue
- The parent IssuecurrentUser
- The userRemoveException
- if there's a problem unlinking original parent.CreateException
- if there's a problem linking new parent.Copyright © 2002-2022 Atlassian. All Rights Reserved.