public class DefaultSubTaskManager 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 |
|---|
DefaultSubTaskManager(ConstantsManager constantsManager,
IssueLinkTypeManager issueLinkTypeManager,
IssueLinkManager issueLinkManager,
PermissionManager permissionManager,
ApplicationProperties applicationProperties,
IssueTypeSchemeManager issueTypeSchemeManager,
IssueManager issueManager) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 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,
Long avatarId)
Update existing sub-task issue type.
|
void |
updateSubTaskIssueType(String id,
String name,
Long sequence,
String description,
String iconurl) |
public DefaultSubTaskManager(ConstantsManager constantsManager, IssueLinkTypeManager issueLinkTypeManager, IssueLinkManager issueLinkManager, PermissionManager permissionManager, ApplicationProperties applicationProperties, IssueTypeSchemeManager issueTypeSchemeManager, IssueManager issueManager)
public void enableSubTasks()
throws CreateException
enableSubTasks in interface SubTaskManagerCreateException - if the default sub-task issue type creation failed.public void enableSubTasks(boolean createDefaultIfMissing)
throws CreateException
SubTaskManagerenableSubTasks in interface SubTaskManagercreateDefaultIfMissing - 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 void disableSubTasks()
disableSubTasks in interface SubTaskManagerpublic Collection<IssueType> getSubTaskIssueTypeObjects()
SubTaskManagergetSubTaskIssueTypeObjects in interface SubTaskManagerIssueTypes.public boolean isSubTasksEnabled()
isSubTasksEnabled in interface SubTaskManagerpublic IssueType insertSubTaskIssueType(String name, Long sequence, String description, String iconurl) throws CreateException
SubTaskManagerinsertSubTaskIssueType in interface SubTaskManagerCreateExceptionpublic IssueType insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId) throws CreateException
SubTaskManagerinsertSubTaskIssueType in interface SubTaskManagerCreateExceptionpublic void updateSubTaskIssueType(String id, String name, Long sequence, String description, String iconurl) throws DataAccessException
updateSubTaskIssueType in interface SubTaskManagerDataAccessExceptionpublic void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId) throws DataAccessException
SubTaskManagerupdateSubTaskIssueType in interface SubTaskManagerDataAccessExceptionpublic boolean issueTypeExistsByName(String name)
issueTypeExistsByName in interface SubTaskManagerpublic void moveSubTaskIssueTypeUp(String id) throws DataAccessException
moveSubTaskIssueTypeUp in interface SubTaskManagerDataAccessExceptionpublic void moveSubTaskIssueTypeDown(String id) throws DataAccessException
moveSubTaskIssueTypeDown in interface SubTaskManagerDataAccessExceptionpublic IssueType getSubTaskIssueTypeById(String id)
SubTaskManagergetSubTaskIssueTypeById in interface SubTaskManagerid - the IDpublic IssueType getSubTaskIssueType(String id)
SubTaskManagergetSubTaskIssueType in interface SubTaskManagerid - the IDpublic void removeSubTaskIssueType(String name) throws RemoveException
removeSubTaskIssueType in interface SubTaskManagerRemoveExceptionpublic boolean issueTypeExistsById(String id)
issueTypeExistsById in interface SubTaskManagerpublic boolean isSubTask(Issue issue)
SubTaskManagerisSubTask in interface SubTaskManagerissue - the issue@Nullable public Long getParentIssueId(org.ofbiz.core.entity.GenericValue issue)
SubTaskManagergetParentIssueId in interface SubTaskManagerissue - the issue@Nullable public Long getParentIssueId(Issue issue)
SubTaskManagergetParentIssueId in interface SubTaskManagerissue - the issueSubTaskManager.getParentIssueId(Long)@Nullable public Long getParentIssueId(Long issueId)
SubTaskManagergetParentIssueId in interface SubTaskManagerissueId - the issue ID of the subtaskSubTaskManager.getParentIssueId(Issue)public SubTaskBean getSubTaskBean(Issue issue, ApplicationUser remoteUser)
SubTaskManagergetSubTaskBean in interface SubTaskManagerissue - the IssueremoteUser - the userpublic void moveSubTask(Issue parentIssue, Long currentSequence, Long sequence)
moveSubTask in interface SubTaskManagerpublic void resetSequences(Issue issue)
resetSequences in interface SubTaskManagerpublic Collection<Long> getAllSubTaskIssueIds()
getAllSubTaskIssueIds in interface SubTaskManagerpublic List<IssueLink> getSubTaskIssueLinks(Long issueId)
SubTaskManagergetSubTaskIssueLinks in interface SubTaskManagerissueId - issue idpublic Collection<Issue> getSubTaskObjects(Issue parentIssue)
getSubTaskObjects in interface SubTaskManagerIssues.public void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) throws CreateException
createSubTaskIssueLink in interface SubTaskManagerCreateExceptionpublic IssueUpdateBean changeParent(Issue subTask, Issue newParentIssue, ApplicationUser currentUser) throws RemoveException, CreateException
SubTaskManagerchangeParent in interface SubTaskManagersubTask - The SubTasknewParentIssue - The parent IssuecurrentUser - The userRemoveException - if there's a problem unlinking original parent.CreateException - if there's a problem linking new parent.Copyright © 2002-2017 Atlassian. All Rights Reserved.