com.atlassian.jira.issue.managers
Class CachingIssueManager

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

public class CachingIssueManager
extends Object
implements IssueManager


Field Summary
(package private)  IssueManager decoratedIssueManager
           
 
Constructor Summary
CachingIssueManager(IssueManager decoratedIssueManager)
           
 
Method Summary
 org.ofbiz.core.entity.GenericValue createIssue(String remoteUserName, Map fields)
          Creates an issue.
 org.ofbiz.core.entity.GenericValue createIssue(User remoteUser, Issue issue)
           
 org.ofbiz.core.entity.GenericValue createIssue(User remoteUser, Map fields)
          Creates an issue.
 List execute(SearchRequest searchRequest, User searcher)
          Takes a search request object and returns a list of issues that match the search request
 List getEntitiesByIssue(String relationName, org.ofbiz.core.entity.GenericValue issue)
          Get a list of entities (versions, components etc) related to this issue.
 org.ofbiz.core.entity.GenericValue getIssue(Long id)
           
 org.ofbiz.core.entity.GenericValue getIssue(String key)
           
 org.ofbiz.core.entity.GenericValue getIssueByWorkflow(Long wfid)
           
 MutableIssue getIssueObject(Long id)
           
 MutableIssue getIssueObject(String key)
           
 List getIssues(Collection ids)
          Get a list of issue generic values by Ids.
 List getIssuesByEntity(String relationName, org.ofbiz.core.entity.GenericValue entity)
          Get a list of issues related to an entity (version, component etc).
 List getIssueWatchers(org.ofbiz.core.entity.GenericValue issue)
           
 List getProjectIssues(org.ofbiz.core.entity.GenericValue project)
          Get all the issues for a given project.
 List getVotedIssues(User user)
          Get a list of issues that the user has voted on
 List getWatchedIssues(User user)
          Get a list of issues that the user is watching
 boolean isEditable(Issue issue)
          Returns whether the issue can be edited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

decoratedIssueManager

IssueManager decoratedIssueManager
Constructor Detail

CachingIssueManager

public CachingIssueManager(IssueManager decoratedIssueManager)
Method Detail

getIssue

public org.ofbiz.core.entity.GenericValue getIssue(Long id)
                                            throws DataAccessException
Specified by:
getIssue in interface IssueManager
Throws:
DataAccessException

getIssue

public org.ofbiz.core.entity.GenericValue getIssue(String key)
                                            throws org.ofbiz.core.entity.GenericEntityException
Specified by:
getIssue in interface IssueManager
Throws:
org.ofbiz.core.entity.GenericEntityException

getIssues

public List getIssues(Collection ids)
Get a list of issue generic values by Ids. Currently no caching is performed on this call

Specified by:
getIssues in interface IssueManager

getIssueByWorkflow

public org.ofbiz.core.entity.GenericValue getIssueByWorkflow(Long wfid)
Specified by:
getIssueByWorkflow in interface IssueManager

getIssueObject

public MutableIssue getIssueObject(Long id)
                            throws DataAccessException
Specified by:
getIssueObject in interface IssueManager
Throws:
DataAccessException

getIssueObject

public MutableIssue getIssueObject(String key)
                            throws DataAccessException
Specified by:
getIssueObject in interface IssueManager
Throws:
DataAccessException

getEntitiesByIssue

public List getEntitiesByIssue(String relationName,
                               org.ofbiz.core.entity.GenericValue issue)
                        throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: IssueManager
Get a list of entities (versions, components etc) related to this issue.

Specified by:
getEntitiesByIssue in interface IssueManager
Parameters:
relationName - A IssueRelationConstants string indicating some issue relation
issue - Issue to consider
Returns:
A list of entity GenericValues associated with the issue.
Throws:
org.ofbiz.core.entity.GenericEntityException

getIssuesByEntity

public List getIssuesByEntity(String relationName,
                              org.ofbiz.core.entity.GenericValue entity)
                       throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: IssueManager
Get a list of issues related to an entity (version, component etc).

Specified by:
getIssuesByEntity in interface IssueManager
Parameters:
relationName - A IssueRelationConstants string indicating some relation of entity
entity - The entity related to the issues we're after
Returns:
A list of issue GenericValues associated with an entity.
Throws:
org.ofbiz.core.entity.GenericEntityException

createIssue

public org.ofbiz.core.entity.GenericValue createIssue(String remoteUserName,
                                                      Map fields)
                                               throws CreateException
Description copied from interface: IssueManager
Creates an issue.

Specified by:
createIssue in interface IssueManager
Parameters:
remoteUserName - Issue creator
fields - A map of the issue's immediate field values. See the Issue definition in entitymodel.xml for values.
Returns:
GenericValue representing the new issue.
Throws:
CreateException

createIssue

public org.ofbiz.core.entity.GenericValue createIssue(User remoteUser,
                                                      Map fields)
                                               throws CreateException
Description copied from interface: IssueManager
Creates an issue.

Specified by:
createIssue in interface IssueManager
Parameters:
remoteUser - Issue creator
fields - A map of the issue's immediate field values. See the Issue definition in entitymodel.xml for values.
Returns:
GenericValue representing the new issue.
Throws:
CreateException

createIssue

public org.ofbiz.core.entity.GenericValue createIssue(User remoteUser,
                                                      Issue issue)
                                               throws CreateException
Specified by:
createIssue in interface IssueManager
Throws:
CreateException

getProjectIssues

public List getProjectIssues(org.ofbiz.core.entity.GenericValue project)
                      throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: IssueManager
Get all the issues for a given project.

Specified by:
getProjectIssues in interface IssueManager
Throws:
org.ofbiz.core.entity.GenericEntityException

isEditable

public boolean isEditable(Issue issue)
Description copied from interface: IssueManager
Returns whether the issue can be edited. This is determined by looking at the workflow step the issue is in.

Specified by:
isEditable in interface IssueManager

getVotedIssues

public List getVotedIssues(User user)
                    throws org.ofbiz.core.entity.GenericEntityException,
                           EntityNotFoundException
Description copied from interface: IssueManager
Get a list of issues that the user has voted on

Specified by:
getVotedIssues in interface IssueManager
Returns:
A list of Issue objects
Throws:
org.ofbiz.core.entity.GenericEntityException
EntityNotFoundException

getIssueWatchers

public List getIssueWatchers(org.ofbiz.core.entity.GenericValue issue)
                      throws org.ofbiz.core.entity.GenericEntityException,
                             EntityNotFoundException
Specified by:
getIssueWatchers in interface IssueManager
Throws:
org.ofbiz.core.entity.GenericEntityException
EntityNotFoundException

getWatchedIssues

public List getWatchedIssues(User user)
                      throws org.ofbiz.core.entity.GenericEntityException,
                             EntityNotFoundException
Description copied from interface: IssueManager
Get a list of issues that the user is watching

Specified by:
getWatchedIssues in interface IssueManager
Returns:
A list of Issue objects
Throws:
org.ofbiz.core.entity.GenericEntityException
EntityNotFoundException

execute

public List 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
searcher - User who is running the search. Make sure this user has permissions to see the issues you want!
Returns:
A List of Issues that match the search request
Throws:
SearchException


Copyright © 2002-2006 Atlassian. All Rights Reserved.