com.atlassian.jira.config
Class MockSubTaskManager

java.lang.Object
  extended by com.atlassian.jira.config.MockSubTaskManager
All Implemented Interfaces:
SubTaskManager

public class MockSubTaskManager
extends Object
implements 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
MockSubTaskManager()
           
 
Method Summary
 IssueUpdateBean changeParent(org.ofbiz.core.entity.GenericValue subTask, org.ofbiz.core.entity.GenericValue 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.
 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()
           
 Collection getAllSubTaskIssueIds()
           
 org.ofbiz.core.entity.GenericValue getParentIssue(org.ofbiz.core.entity.GenericValue issue)
          Get the parent issue from a subtask
 Long getParentIssueId(org.ofbiz.core.entity.GenericValue 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 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 getSubTaskObjects(Issue issue)
           
 Collection getSubTasks(org.ofbiz.core.entity.GenericValue issue)
           
 IssueType insertSubTaskIssueType(String name, Long sequence, String description, String iconurl)
           
 boolean isSubTask(org.ofbiz.core.entity.GenericValue issue)
           
 boolean isSubTaskIssueType(org.ofbiz.core.entity.GenericValue issueType)
           
 boolean isSubTasksEnabled()
           
 boolean issueTypeExistsById(String id)
           
 boolean issueTypeExistsByName(String name)
           
 void moveSubTask(org.ofbiz.core.entity.GenericValue issue, Long currentSequence, Long sequence)
          move SubTask
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockSubTaskManager

public MockSubTaskManager()
Method Detail

enableSubTasks

public void enableSubTasks()
                    throws CreateException
Specified by:
enableSubTasks in interface SubTaskManager
Throws:
CreateException

isSubTasksEnabled

public boolean isSubTasksEnabled()
Specified by:
isSubTasksEnabled in interface SubTaskManager

disableSubTasks

public void disableSubTasks()
Specified by:
disableSubTasks in interface SubTaskManager

isSubTask

public boolean isSubTask(org.ofbiz.core.entity.GenericValue issue)
Specified by:
isSubTask in interface SubTaskManager

isSubTaskIssueType

public boolean isSubTaskIssueType(org.ofbiz.core.entity.GenericValue issueType)
Specified by:
isSubTaskIssueType in interface SubTaskManager

getParentIssueId

public Long getParentIssueId(org.ofbiz.core.entity.GenericValue issue)
Specified by:
getParentIssueId in interface SubTaskManager

getParentIssue

public org.ofbiz.core.entity.GenericValue getParentIssue(org.ofbiz.core.entity.GenericValue issue)
Description copied from interface: SubTaskManager
Get the parent issue from a subtask

Specified by:
getParentIssue in interface SubTaskManager
Parameters:
issue - subtask
Returns:
the parent issue form a subtask

getSubTaskBean

public SubTaskBean getSubTaskBean(org.ofbiz.core.entity.GenericValue issue,
                                  com.atlassian.crowd.embedded.api.User remoteUser)
Description copied from interface: SubTaskManager
Returns the SubTaskBean for the given parent issue in the context of the given user.

Specified by:
getSubTaskBean in interface SubTaskManager
Parameters:
issue - the Issue
remoteUser - the user
Returns:
the SubTaskBean for the given parent issue in the context of the given user.

getSubTaskBean

public SubTaskBean getSubTaskBean(Issue issue,
                                  com.atlassian.crowd.embedded.api.User remoteUser)
Description copied from interface: SubTaskManager
Returns the SubTaskBean for the given parent issue in the context of the given user.

Specified by:
getSubTaskBean in interface SubTaskManager
Parameters:
issue - the Issue
remoteUser - the user
Returns:
the SubTaskBean for the given parent issue in the context of the given user.

moveSubTask

public void moveSubTask(org.ofbiz.core.entity.GenericValue issue,
                        Long currentSequence,
                        Long sequence)
Description copied from interface: SubTaskManager
move SubTask

Specified by:
moveSubTask in interface SubTaskManager

moveSubTask

public void moveSubTask(Issue issue,
                        Long currentSequence,
                        Long sequence)
Specified by:
moveSubTask in interface SubTaskManager

resetSequences

public void resetSequences(Issue issue)
Specified by:
resetSequences in interface SubTaskManager

createSubTaskIssueType

public org.ofbiz.core.entity.GenericValue createSubTaskIssueType(String name,
                                                                 Long sequence,
                                                                 String description,
                                                                 String iconurl)
                                                          throws CreateException
Description copied from interface: SubTaskManager
create SubTask IssueType

Specified by:
createSubTaskIssueType in interface SubTaskManager
Returns:
Throws:
CreateException

insertSubTaskIssueType

public IssueType insertSubTaskIssueType(String name,
                                        Long sequence,
                                        String description,
                                        String iconurl)
                                 throws CreateException
Specified by:
insertSubTaskIssueType in interface SubTaskManager
Throws:
CreateException

updateSubTaskIssueType

public void updateSubTaskIssueType(String id,
                                   String name,
                                   Long sequence,
                                   String description,
                                   String iconurl)
Specified by:
updateSubTaskIssueType in interface SubTaskManager

removeSubTaskIssueType

public void removeSubTaskIssueType(String name)
                            throws RemoveException
Specified by:
removeSubTaskIssueType in interface SubTaskManager
Throws:
RemoveException

getSubTaskIssueTypeObjects

public Collection<IssueType> getSubTaskIssueTypeObjects()
Description copied from interface: SubTaskManager
Retrieves all the sub-task issue types

Specified by:
getSubTaskIssueTypeObjects in interface SubTaskManager
Returns:
A Collection of all sub-task IssueTypes.

issueTypeExistsById

public boolean issueTypeExistsById(String id)
Specified by:
issueTypeExistsById in interface SubTaskManager

issueTypeExistsByName

public boolean issueTypeExistsByName(String name)
Specified by:
issueTypeExistsByName in interface SubTaskManager

moveSubTaskIssueTypeUp

public void moveSubTaskIssueTypeUp(String id)
Specified by:
moveSubTaskIssueTypeUp in interface SubTaskManager

moveSubTaskIssueTypeDown

public void moveSubTaskIssueTypeDown(String id)
Specified by:
moveSubTaskIssueTypeDown in interface SubTaskManager

getSubTaskIssueTypeById

public org.ofbiz.core.entity.GenericValue getSubTaskIssueTypeById(String id)
Description copied from interface: SubTaskManager
Returns the SubTask IssueType with the given ID.

Specified by:
getSubTaskIssueTypeById in interface SubTaskManager
Parameters:
id - the ID
Returns:
SubTask IssueType with the given ID.

getSubTaskIssueType

public IssueType getSubTaskIssueType(String id)
Description copied from interface: SubTaskManager
Returns the SubTask IssueType with the given ID.

Specified by:
getSubTaskIssueType in interface SubTaskManager
Parameters:
id - the ID
Returns:
SubTask IssueType with the given ID.

createSubTaskIssueLink

public void createSubTaskIssueLink(org.ofbiz.core.entity.GenericValue parentIssue,
                                   org.ofbiz.core.entity.GenericValue subTaskIssue,
                                   com.atlassian.crowd.embedded.api.User remoteUser)
                            throws CreateException
Description copied from interface: SubTaskManager
create SubTask IssueLink

Specified by:
createSubTaskIssueLink in interface SubTaskManager
Throws:
CreateException

createSubTaskIssueLink

public void createSubTaskIssueLink(Issue parentIssue,
                                   Issue subTaskIssue,
                                   com.atlassian.crowd.embedded.api.User remoteUser)
                            throws CreateException
Specified by:
createSubTaskIssueLink in interface SubTaskManager
Throws:
CreateException

getAllSubTaskIssueIds

public Collection getAllSubTaskIssueIds()
Specified by:
getAllSubTaskIssueIds in interface SubTaskManager

getSubTaskIssueLinks

public List getSubTaskIssueLinks(Long issueId)
Description copied from interface: SubTaskManager
Returns a list of issue links associated with the issue

Specified by:
getSubTaskIssueLinks in interface SubTaskManager
Parameters:
issueId - issue id
Returns:
a list of issue links

getSubTasks

public Collection getSubTasks(org.ofbiz.core.entity.GenericValue issue)
Specified by:
getSubTasks in interface SubTaskManager
Parameters:
issue - the issue
Returns:
subtasks as GenericValues

getSubTaskObjects

public Collection getSubTaskObjects(Issue issue)
Specified by:
getSubTaskObjects in interface SubTaskManager

changeParent

public IssueUpdateBean changeParent(org.ofbiz.core.entity.GenericValue subTask,
                                    org.ofbiz.core.entity.GenericValue parentIssue,
                                    com.atlassian.crowd.embedded.api.User currentUser)
                             throws RemoveException,
                                    CreateException
Description copied from interface: SubTaskManager
Change the parent of the given subtask to the given new parent on behalf of the given user.

Specified by:
changeParent in interface SubTaskManager
Parameters:
subTask - The SubTask
parentIssue - The parent Issue
currentUser - 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.

changeParent

public IssueUpdateBean changeParent(Issue subTask,
                                    Issue parentIssue,
                                    com.atlassian.crowd.embedded.api.User currentUser)
                             throws RemoveException,
                                    CreateException
Description copied from interface: SubTaskManager
Change the parent of the given subtask to the given new parent on behalf of the given user.

Specified by:
changeParent in interface SubTaskManager
Parameters:
subTask - The SubTask
parentIssue - The parent Issue
currentUser - 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.


Copyright © 2002-2013 Atlassian. All Rights Reserved.