com.atlassian.jira.issue.managers
Class DefaultIssueManager

java.lang.Object
  extended bycom.atlassian.jira.issue.managers.DefaultIssueManager
All Implemented Interfaces:
IssueManager, JiraManager

public class DefaultIssueManager
extends java.lang.Object
implements IssueManager


Constructor Summary
DefaultIssueManager()
           
 
Method Summary
 java.util.Collection execute(SearchRequest searchRequest, User searcher)
          Takes a search request object and returns a list of issues that match the search request
 java.util.List getEntitiesByIssue(java.lang.String relationName, GenericValue issue)
          Get a list of entities related to this issue by their relationship name.
 GenericValue getIssue(java.lang.Long id)
           
 GenericValue getIssue(java.lang.String key)
           
 GenericValue getIssueByWorkflow(java.lang.Long wfid)
           
 java.util.List getIssuesByEntity(java.lang.String relationName, GenericValue entity)
          Get a list of issues related to this entity by their relationship name.
 java.util.List getIssueWatchers(GenericValue issue)
          Return a list of users that are watching an issue.
 java.util.List getVotedIssues(User user)
          Retrieves all the issues a user has voted for.
 java.util.List getWatchedIssues(User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIssueManager

public DefaultIssueManager()
Method Detail

getIssue

public GenericValue getIssue(java.lang.Long id)
                      throws GenericEntityException
Specified by:
getIssue in interface IssueManager
Throws:
GenericEntityException

getIssue

public GenericValue getIssue(java.lang.String key)
                      throws GenericEntityException
Specified by:
getIssue in interface IssueManager
Throws:
GenericEntityException

getIssueByWorkflow

public GenericValue getIssueByWorkflow(java.lang.Long wfid)
                                throws GenericEntityException
Specified by:
getIssueByWorkflow in interface IssueManager
Throws:
GenericEntityException

getEntitiesByIssue

public java.util.List getEntitiesByIssue(java.lang.String relationName,
                                         GenericValue issue)
                                  throws GenericEntityException
Description copied from interface: IssueManager
Get a list of entities related to this issue by their relationship name. Example relation names include IssueRelationConstants.VERSION, IssueRelationConstants.COMPONENT - IssueRelationConstants

Specified by:
getEntitiesByIssue in interface IssueManager
Throws:
GenericEntityException

getIssuesByEntity

public java.util.List getIssuesByEntity(java.lang.String relationName,
                                        GenericValue entity)
                                 throws GenericEntityException
Description copied from interface: IssueManager
Get a list of issues related to this entity by their relationship name. Example relation names include IssueRelationConstants.VERSION, IssueRelationConstants.COMPONENT - IssueRelationConstants

Specified by:
getIssuesByEntity in interface IssueManager
Throws:
GenericEntityException

getVotedIssues

public java.util.List getVotedIssues(User user)
                              throws GenericEntityException,
                                     EntityNotFoundException
Retrieves all the issues a user has voted for.

Specified by:
getVotedIssues in interface IssueManager
Parameters:
user - The user that has voted
Returns:
List of Issues the user has voted on
Throws:
GenericEntityException
EntityNotFoundException

getIssueWatchers

public java.util.List getIssueWatchers(GenericValue issue)
                                throws GenericEntityException,
                                       EntityNotFoundException
Return a list of users that are watching an issue.

Specified by:
getIssueWatchers in interface IssueManager
Parameters:
issue - The issue
Returns:
List of Users
Throws:
GenericEntityException
EntityNotFoundException

getWatchedIssues

public java.util.List getWatchedIssues(User user)
                                throws GenericEntityException,
                                       EntityNotFoundException
Specified by:
getWatchedIssues in interface IssueManager
Throws:
GenericEntityException
EntityNotFoundException

execute

public java.util.Collection execute(SearchRequest searchRequest,
                                    User searcher)
                             throws SearchException
Takes a search request object and returns a list of issues that match the search request

Specified by:
execute in interface IssueManager
Parameters:
searchRequest - object to be used to search for
Returns:
A List of Issues that match the search request
Throws:
SearchException