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(org.ofbiz.core.entity.GenericValue subTask,
org.ofbiz.core.entity.GenericValue newParentIssue,
com.atlassian.crowd.embedded.api.User currentUser)
Change the parent of the given subtask to the given new parent on behalf
of the given user.
|
IssueUpdateBean |
changeParent(Issue subTask,
Issue parentIssue,
com.atlassian.crowd.embedded.api.User currentUser)
Change the parent of the given subtask to the given new parent on behalf
of the given user.
|
void |
createSubTaskIssueLink(org.ofbiz.core.entity.GenericValue parentIssue,
org.ofbiz.core.entity.GenericValue subTaskIssue,
com.atlassian.crowd.embedded.api.User remoteUser)
create SubTask IssueLink
|
void |
createSubTaskIssueLink(Issue parentIssue,
Issue subTaskIssue,
com.atlassian.crowd.embedded.api.User remoteUser) |
org.ofbiz.core.entity.GenericValue |
createSubTaskIssueType(String name,
Long sequence,
String description,
String iconurl)
create SubTask IssueType
|
void |
disableSubTasks() |
void |
enableSubTasks()
Turn on sub-tasks by creating a sub-task issue link type
and a default sub-task issue type
|
Collection<Long> |
getAllSubTaskIssueIds()
Retrieves ids of all sub-task issues in the system.
|
org.ofbiz.core.entity.GenericValue |
getParentIssue(org.ofbiz.core.entity.GenericValue subtask)
Get the parent issue from a subtask
|
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(org.ofbiz.core.entity.GenericValue issue,
com.atlassian.crowd.embedded.api.User remoteUser)
Returns the SubTaskBean for the given parent issue in the context of the given user.
|
SubTaskBean |
getSubTaskBean(Issue issue,
com.atlassian.crowd.embedded.api.User 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.
|
org.ofbiz.core.entity.GenericValue |
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.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getSubTasks(org.ofbiz.core.entity.GenericValue issue)
Deprecated.
Use
getSubTaskObjects(com.atlassian.jira.issue.Issue) instead. |
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(org.ofbiz.core.entity.GenericValue issue)
Return true if the given issue is a subtask.
|
boolean |
isSubTask(Issue issue)
Return true if the given issue is a subtask.
|
boolean |
isSubTaskIssueType(org.ofbiz.core.entity.GenericValue issueType)
Return true if the given issue type is a subtask issue type.
|
boolean |
isSubTasksEnabled() |
boolean |
issueTypeExistsById(String id) |
boolean |
issueTypeExistsByName(String name) |
void |
moveSubTask(org.ofbiz.core.entity.GenericValue parentIssue,
Long currentSequence,
Long sequence)
move SubTask
|
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 SubTaskManager
CreateException
public void disableSubTasks()
disableSubTasks
in interface SubTaskManager
public Collection<IssueType> getSubTaskIssueTypeObjects()
SubTaskManager
getSubTaskIssueTypeObjects
in interface SubTaskManager
IssueType
s.public boolean isSubTasksEnabled()
isSubTasksEnabled
in interface SubTaskManager
public org.ofbiz.core.entity.GenericValue createSubTaskIssueType(String name, Long sequence, String description, String iconurl) throws CreateException
SubTaskManager
createSubTaskIssueType
in interface SubTaskManager
CreateException
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) throws DataAccessException
updateSubTaskIssueType
in interface SubTaskManager
DataAccessException
public void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId) throws DataAccessException
SubTaskManager
updateSubTaskIssueType
in interface SubTaskManager
DataAccessException
public boolean issueTypeExistsByName(String name)
issueTypeExistsByName
in interface SubTaskManager
public void moveSubTaskIssueTypeUp(String id) throws DataAccessException
moveSubTaskIssueTypeUp
in interface SubTaskManager
DataAccessException
public void moveSubTaskIssueTypeDown(String id) throws DataAccessException
moveSubTaskIssueTypeDown
in interface SubTaskManager
DataAccessException
public org.ofbiz.core.entity.GenericValue getSubTaskIssueTypeById(String id)
SubTaskManager
getSubTaskIssueTypeById
in interface SubTaskManager
id
- the IDpublic IssueType getSubTaskIssueType(String id)
SubTaskManager
getSubTaskIssueType
in interface SubTaskManager
id
- the IDpublic void removeSubTaskIssueType(String name) throws RemoveException
removeSubTaskIssueType
in interface SubTaskManager
RemoveException
public boolean issueTypeExistsById(String id)
issueTypeExistsById
in interface SubTaskManager
public boolean isSubTask(org.ofbiz.core.entity.GenericValue issue)
SubTaskManager
isSubTask
in interface SubTaskManager
issue
- the issuepublic boolean isSubTask(Issue issue)
SubTaskManager
isSubTask
in interface SubTaskManager
issue
- the issuepublic boolean isSubTaskIssueType(org.ofbiz.core.entity.GenericValue issueType)
SubTaskManager
isSubTaskIssueType
in interface SubTaskManager
issueType
- the issue type@Nullable public Long getParentIssueId(org.ofbiz.core.entity.GenericValue issue)
SubTaskManager
getParentIssueId
in interface SubTaskManager
issue
- the issue@Nullable public Long getParentIssueId(Issue issue)
SubTaskManager
getParentIssueId
in interface SubTaskManager
issue
- the issueSubTaskManager.getParentIssueId(Long)
@Nullable public Long getParentIssueId(Long issueId)
SubTaskManager
getParentIssueId
in interface SubTaskManager
issueId
- the issue ID of the subtaskSubTaskManager.getParentIssueId(Issue)
public org.ofbiz.core.entity.GenericValue getParentIssue(org.ofbiz.core.entity.GenericValue subtask)
SubTaskManager
getParentIssue
in interface SubTaskManager
subtask
- subtaskpublic SubTaskBean getSubTaskBean(org.ofbiz.core.entity.GenericValue issue, com.atlassian.crowd.embedded.api.User remoteUser)
SubTaskManager
getSubTaskBean
in interface SubTaskManager
issue
- the IssueremoteUser
- the userpublic SubTaskBean getSubTaskBean(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser)
SubTaskManager
getSubTaskBean
in interface SubTaskManager
issue
- the IssueremoteUser
- the userpublic void moveSubTask(org.ofbiz.core.entity.GenericValue parentIssue, Long currentSequence, Long sequence)
SubTaskManager
moveSubTask
in interface SubTaskManager
public void moveSubTask(Issue parentIssue, Long currentSequence, Long sequence)
moveSubTask
in interface SubTaskManager
public void resetSequences(Issue issue)
resetSequences
in interface SubTaskManager
public Collection<Long> getAllSubTaskIssueIds()
getAllSubTaskIssueIds
in interface SubTaskManager
public List<IssueLink> getSubTaskIssueLinks(Long issueId)
SubTaskManager
getSubTaskIssueLinks
in interface SubTaskManager
issueId
- issue idpublic Collection<org.ofbiz.core.entity.GenericValue> getSubTasks(org.ofbiz.core.entity.GenericValue issue)
getSubTaskObjects(com.atlassian.jira.issue.Issue)
instead.getSubTasks
in interface SubTaskManager
issue
- the issuepublic Collection<Issue> getSubTaskObjects(Issue parentIssue)
getSubTaskObjects
in interface SubTaskManager
Issue
s.public void createSubTaskIssueLink(org.ofbiz.core.entity.GenericValue parentIssue, org.ofbiz.core.entity.GenericValue subTaskIssue, com.atlassian.crowd.embedded.api.User remoteUser) throws CreateException
SubTaskManager
createSubTaskIssueLink
in interface SubTaskManager
CreateException
public void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, com.atlassian.crowd.embedded.api.User remoteUser) throws CreateException
createSubTaskIssueLink
in interface SubTaskManager
CreateException
public IssueUpdateBean changeParent(org.ofbiz.core.entity.GenericValue subTask, org.ofbiz.core.entity.GenericValue newParentIssue, com.atlassian.crowd.embedded.api.User currentUser) throws RemoveException, CreateException
SubTaskManager
changeParent
in interface SubTaskManager
subTask
- The SubTasknewParentIssue
- The parent IssuecurrentUser
- The userRemoveException
- if there's a problem unlinking original parent.CreateException
- if there's a problem linking new parent.public IssueUpdateBean changeParent(Issue subTask, Issue parentIssue, com.atlassian.crowd.embedded.api.User 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-2015 Atlassian. All Rights Reserved.