com.atlassian.jira.issue
Interface IssueManager

All Superinterfaces:
JiraManager
All Known Implementing Classes:
DefaultIssueManager

@PublicApi
public interface IssueManager
extends JiraManager

A class to manage interactions with issues


Method Summary
 org.ofbiz.core.entity.GenericValue createIssue(String remoteUserName, Map<String,Object> fields)
          Deprecated. Use createIssueObject(String, Map) instead since v5.0.
 org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser, Issue issue)
          Deprecated. Use createIssueObject(User, Issue) instead. Since v5.0
 org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser, Map<String,Object> fields)
          Deprecated. Use createIssueObject(User, java.util.Map) instead. Since v5.0.
 Issue createIssueObject(String remoteUserName, Map<String,Object> fields)
          Creates an issue.
 Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser, Issue issue)
          Creates an issue.
 Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser, Map<String,Object> fields)
          Creates an issue.
 void deleteIssue(com.atlassian.crowd.embedded.api.User user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail)
          This method will delete an issue from JIRA.
 void deleteIssue(com.atlassian.crowd.embedded.api.User user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail)
          Deprecated. Use deleteIssue(com.atlassian.crowd.embedded.api.User, Issue, com.atlassian.jira.event.type.EventDispatchOption, boolean) instead. Since v5.0.
 void deleteIssueNoEvent(Issue issue)
          Delete issue without firing any events, or sending notifications.
 void deleteIssueNoEvent(MutableIssue issue)
          Deprecated. Use deleteIssueNoEvent(com.atlassian.jira.issue.Issue) instead. Since v5.0.
 List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssue(String relationName, org.ofbiz.core.entity.GenericValue issue)
          Get a list of entities (versions, components etc) related to this issue.
 List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssueObject(String relationName, Issue issue)
          Get a list of entities (versions, components etc) related to this issue.
 org.ofbiz.core.entity.GenericValue getIssue(Long id)
          Deprecated. Use getIssueObject(Long) instead.
 org.ofbiz.core.entity.GenericValue getIssue(String key)
          Deprecated. Use getIssueObject(String) instead.
 org.ofbiz.core.entity.GenericValue getIssueByWorkflow(Long wfid)
          Deprecated. Use getIssueObjectByWorkflow(Long) instead. Since v5.0
 long getIssueCountForProject(Long projectId)
          Returns the number of issues that exist for the provided project id.
 Collection<Long> getIssueIdsForProject(Long projectId)
          Returns all issue ids for a particular project.
 MutableIssue getIssueObject(Long id)
          Retrieves an issue by id.
 MutableIssue getIssueObject(String key)
          Retrieves the Issue that has the given key, or null if no such Issue exists.
 MutableIssue getIssueObjectByWorkflow(Long workflowId)
          Retrieves an issue given a workflow ID.
 List<Issue> getIssueObjects(Collection<Long> ids)
          Get issues with the following ids.
 List<Issue> getIssueObjectsByEntity(String relationName, org.ofbiz.core.entity.GenericValue entity)
          Get a list of issues related to an entity (version, component etc).
 List<org.ofbiz.core.entity.GenericValue> getIssues(Collection<Long> ids)
          Deprecated. Use getIssueObjects(java.util.Collection) instead. Since v5.0
 List<org.ofbiz.core.entity.GenericValue> getIssuesByEntity(String relationName, org.ofbiz.core.entity.GenericValue entity)
          Get a list of issues related to an entity (version, component etc).
 List<org.ofbiz.core.entity.GenericValue> getProjectIssues(org.ofbiz.core.entity.GenericValue project)
          Deprecated. only used in test cases, should use a search provider instead.
 long getUnassignedIssueCount()
          Returns the number of unassigned issues.
 List<Issue> getVotedIssues(com.atlassian.crowd.embedded.api.User user)
          Get a list of issues that the user has voted on and can see.
 List<Issue> getVotedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
          Get a list of issues that the user has voted on.
 List<Issue> getWatchedIssues(com.atlassian.crowd.embedded.api.User user)
          Get a list of issues that the user is watching and can see.
 List<Issue> getWatchedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
          Get a list of issues that the user is watching
 List<com.atlassian.crowd.embedded.api.User> getWatchers(Issue issue)
          Return a list of watchers for a particular issue.
 boolean hasUnassignedIssues()
          Returns a boolean indicating whether there are unassigned issues.
 boolean isEditable(Issue issue)
          Returns true if the issue can be edited.
 boolean isEditable(Issue issue, com.atlassian.crowd.embedded.api.User user)
          Returns true if the issue can be edited by the current user.
 Issue updateIssue(com.atlassian.crowd.embedded.api.User user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail)
          This method will store the provided issue to the JIRA datastore.
 

Method Detail

getIssue

@Deprecated
org.ofbiz.core.entity.GenericValue getIssue(Long id)
                                            throws DataAccessException
Deprecated. Use getIssueObject(Long) instead.

Retrieves an issue by its id.

Parameters:
id - Issue ID.
Returns:
An issue GenericValue.
Throws:
DataAccessException - if there is an error in the Data Access Layer.

getIssue

@Deprecated
org.ofbiz.core.entity.GenericValue getIssue(String key)
                                            throws org.ofbiz.core.entity.GenericEntityException
Deprecated. Use getIssueObject(String) instead.

Retrieves the issue as a GenericValue with the given key.

Parameters:
key - the issue key.
Returns:
the issue as a GenericValue.
Throws:
org.ofbiz.core.entity.GenericEntityException - if there is a problem getting the data

getIssueByWorkflow

@Deprecated
org.ofbiz.core.entity.GenericValue getIssueByWorkflow(Long wfid)
                                                      throws org.ofbiz.core.entity.GenericEntityException
Deprecated. Use getIssueObjectByWorkflow(Long) instead. Since v5.0

Retrieves an issue GenericValue given a workflow ID. This is used when transitioning through the various steps of a workflow.

Parameters:
wfid - workflow ID.
Returns:
An issue GenericValue.
Throws:
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.

getIssueObjectByWorkflow

MutableIssue getIssueObjectByWorkflow(Long workflowId)
                                      throws org.ofbiz.core.entity.GenericEntityException
Retrieves an issue given a workflow ID. This is used when transitioning through the various steps of a workflow.

Parameters:
workflowId - workflow ID.
Returns:
The Issue
Throws:
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.

getIssueObject

MutableIssue getIssueObject(Long id)
                            throws DataAccessException
Retrieves an issue by id. This method will always return a new instance of an issue.

Parameters:
id - the id
Returns:
A MutableIssue
Throws:
DataAccessException - if there is an error in the Data Access Layer.

getIssueObject

MutableIssue getIssueObject(String key)
                            throws DataAccessException
Retrieves the Issue that has the given key, or null if no such Issue exists.

This method will always return a new instance of an issue object if the issue exists.

Parameters:
key - The Issue key.
Returns:
a MutableIssue with the given key, or null if no such Issue exists.
Throws:
DataAccessException - if there is an error in the Data Access Layer.

getIssues

@Deprecated
List<org.ofbiz.core.entity.GenericValue> getIssues(Collection<Long> ids)
Deprecated. Use getIssueObjects(java.util.Collection) instead. Since v5.0

Get issues with the following ids. The issues are sorted in the order that the ids were given in.

Parameters:
ids - Issue IDs.
Returns:
A collection of issue GenericValues

getIssueObjects

List<Issue> getIssueObjects(Collection<Long> ids)
Get issues with the following ids. The issues are sorted in the order that the ids were given in.

Parameters:
ids - Issue IDs.
Returns:
A collection of issue MutableIssues

getVotedIssues

List<Issue> getVotedIssues(com.atlassian.crowd.embedded.api.User user)
                           throws org.ofbiz.core.entity.GenericEntityException
Get a list of issues that the user has voted on and can see.

Parameters:
user - The user.
Returns:
A list of Issue objects the user has voted on.
Throws:
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.

getVotedIssuesOverrideSecurity

List<Issue> getVotedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
                                           throws org.ofbiz.core.entity.GenericEntityException
Get a list of issues that the user has voted on.

Parameters:
user - The user.
Returns:
A list of Issue objects the user has voted on.
Throws:
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.
Since:
v4.0

getWatchers

List<com.atlassian.crowd.embedded.api.User> getWatchers(Issue issue)
Return a list of watchers for a particular issue.

Parameters:
issue - the Issue
Returns:
A list of Users.

getWatchedIssues

List<Issue> getWatchedIssues(com.atlassian.crowd.embedded.api.User user)
Get a list of issues that the user is watching and can see.

Parameters:
user - the User.
Returns:
A list of Issue objects

getWatchedIssuesOverrideSecurity

List<Issue> getWatchedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
Get a list of issues that the user is watching

Parameters:
user - the User.
Returns:
A list of Issue objects
Since:
v4.0

getEntitiesByIssue

List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssue(String relationName,
                                                            org.ofbiz.core.entity.GenericValue issue)
                                                            throws org.ofbiz.core.entity.GenericEntityException
Get a list of entities (versions, components etc) related to this issue.

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 - An exception in the ofbiz Entity Engine.

getEntitiesByIssueObject

List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssueObject(String relationName,
                                                                  Issue issue)
                                                                  throws org.ofbiz.core.entity.GenericEntityException
Get a list of entities (versions, components etc) related to this issue.

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 - An exception in the ofbiz Entity Engine.

getIssuesByEntity

List<org.ofbiz.core.entity.GenericValue> getIssuesByEntity(String relationName,
                                                           org.ofbiz.core.entity.GenericValue entity)
                                                           throws org.ofbiz.core.entity.GenericEntityException
Get a list of issues related to an entity (version, component etc).

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 - An exception in the ofbiz Entity Engine.

getIssueObjectsByEntity

List<Issue> getIssueObjectsByEntity(String relationName,
                                    org.ofbiz.core.entity.GenericValue entity)
                                    throws org.ofbiz.core.entity.GenericEntityException
Get a list of issues related to an entity (version, component etc).

Parameters:
relationName - A IssueRelationConstants string indicating some relation of entity
entity - The entity related to the issues we're after
Returns:
A list of MutableIssues associated with an entity.
Throws:
org.ofbiz.core.entity.GenericEntityException - if it failed to get the list of issues.

createIssue

@Deprecated
org.ofbiz.core.entity.GenericValue createIssue(String remoteUserName,
                                                          Map<String,Object> fields)
                                               throws CreateException
Deprecated. Use createIssueObject(String, Map) instead since v5.0.

Creates an issue.

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 - If JIRA is unable to create the issue.

createIssueObject

Issue createIssueObject(String remoteUserName,
                        Map<String,Object> fields)
                        throws CreateException
Creates an issue.

Parameters:
remoteUserName - Issue creator
fields - A map of the issue's immediate field values. See the Issue definition in entitymodel.xml for values.
Returns:
representing the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

createIssue

@Deprecated
org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser,
                                                          Map<String,Object> fields)
                                               throws CreateException
Deprecated. Use createIssueObject(User, java.util.Map) instead. Since v5.0.

Creates an issue.

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 - If JIRA is unable to create the issue.

createIssueObject

Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser,
                        Map<String,Object> fields)
                        throws CreateException
Creates an issue.

Parameters:
remoteUser - Issue creator
fields - A map of the issue's immediate field values. See the Issue definition in entitymodel.xml for values.
Returns:
the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

createIssue

@Deprecated
org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser,
                                                          Issue issue)
                                               throws CreateException
Deprecated. Use createIssueObject(User, Issue) instead. Since v5.0

Persists a new issue.

Parameters:
remoteUser - Issue creator
issue - The new issue.
Returns:
GenericValue representing the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

createIssueObject

Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser,
                        Issue issue)
                        throws CreateException
Creates an issue.

Parameters:
remoteUser - Issue creator
issue - The new issue.
Returns:
the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

updateIssue

Issue updateIssue(com.atlassian.crowd.embedded.api.User user,
                  MutableIssue issue,
                  EventDispatchOption eventDispatchOption,
                  boolean sendMail)
This method will store the provided issue to the JIRA datastore. The issue will be saved and re-indexed. This method performs no permission checks.

This method should be used if you want to exert more control over what happens when JIRA updates an issue. This method will allow you to specify if an event is dispatched and if so which event is dispatched, see EventDispatchOption. This method also allows you to specify if email notifications should be send to notify users of the update.

Parameters:
user - who is performing the operation
issue - the issue to update
eventDispatchOption - specifies if an event should be sent and if so which should be sent.
sendMail - if true mail notifications will be sent, otherwise mail notifications will be suppressed.
Returns:
the updated issue.
Since:
v4.0

deleteIssue

void deleteIssue(com.atlassian.crowd.embedded.api.User user,
                 Issue issue,
                 EventDispatchOption eventDispatchOption,
                 boolean sendMail)
                 throws RemoveException
This method will delete an issue from JIRA.

This will clean up all issue associations in JIRA and will de-index the issue.

This method should be used if you want to exert more control over what happens when JIRA deletes an issue. This method will allow you to specify if an event is dispatched and if so which event is dispatched, see EventDispatchOption. This method also allows you to specify if email notifications should be send to notify users of the deletion.

Parameters:
user - who is performing the operation
issue - the issue to delete.
eventDispatchOption - specifies if an event should be sent and if so which should be sent.
sendMail - if true mail notifications will be sent, otherwise mail notifications will be suppressed.
Throws:
RemoveException - throw if something goes horribly wrong when deleting the issue.
Since:
v5.0

deleteIssue

void deleteIssue(com.atlassian.crowd.embedded.api.User user,
                 MutableIssue issue,
                 EventDispatchOption eventDispatchOption,
                 boolean sendMail)
                 throws RemoveException
Deprecated. Use deleteIssue(com.atlassian.crowd.embedded.api.User, Issue, com.atlassian.jira.event.type.EventDispatchOption, boolean) instead. Since v5.0.

This method will delete an issue from JIRA. This will clean up all issue associations in JIRA and will de-index the issue.

This method should be used if you want to exert more control over what happens when JIRA deletes an issue. This method will allow you to specify if an event is dispatched and if so which event is dispatched, see EventDispatchOption. This method also allows you to specify if email notifications should be send to notify users of the deletion.

Parameters:
user - who is performing the operation
issue - the issue to delete.
eventDispatchOption - specifies if an event should be sent and if so which should be sent.
sendMail - if true mail notifications will be sent, otherwise mail notifications will be suppressed.
Throws:
RemoveException - throw if something goes horribly wrong when deleting the issue.
Since:
v4.0

deleteIssueNoEvent

void deleteIssueNoEvent(Issue issue)
                        throws RemoveException
Delete issue without firing any events, or sending notifications.

This is preferred in some bulk operations, but normally you would call deleteIssue(com.atlassian.crowd.embedded.api.User, Issue, com.atlassian.jira.event.type.EventDispatchOption, boolean)

Parameters:
issue - issue to delete
Throws:
RemoveException - if the removal fails
See Also:
deleteIssue(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.issue.Issue, com.atlassian.jira.event.type.EventDispatchOption, boolean)

deleteIssueNoEvent

void deleteIssueNoEvent(MutableIssue issue)
                        throws RemoveException
Deprecated. Use deleteIssueNoEvent(com.atlassian.jira.issue.Issue) instead. Since v5.0.

Delete issue without firing any events, or sending notifications.

This is preferred in some bulk operations, but normally you would call deleteIssue(com.atlassian.crowd.embedded.api.User, MutableIssue, com.atlassian.jira.event.type.EventDispatchOption, boolean)

Parameters:
issue - issue to delete
Throws:
RemoveException - if the removal fails
See Also:
deleteIssue(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.issue.MutableIssue, com.atlassian.jira.event.type.EventDispatchOption, boolean)

getProjectIssues

@Deprecated
List<org.ofbiz.core.entity.GenericValue> getProjectIssues(org.ofbiz.core.entity.GenericValue project)
                                                          throws org.ofbiz.core.entity.GenericEntityException
Deprecated. only used in test cases, should use a search provider instead.

Get all the issues for a given project.

Parameters:
project - the Project
Returns:
a List of GenericValue objects
Throws:
org.ofbiz.core.entity.GenericEntityException - If there are errors in the persistence layer.

isEditable

boolean isEditable(Issue issue)
Returns true if the issue can be edited. This is determined by looking at the workflow step the issue is in.

Parameters:
issue - the Issue.
Returns:
true if the issue can be edited. This is determined by looking at the workflow step the issue is in.

isEditable

boolean isEditable(Issue issue,
                   com.atlassian.crowd.embedded.api.User user)
Returns true if the issue can be edited by the current user. This is determined by looking at both the user's permissions and the workflow step the issue is in.

Parameters:
issue - the issue you want to edit
user - the user who will be performing the edit
Returns:
true if the user has permission and the issue is in an editable workflow step

getIssueIdsForProject

Collection<Long> getIssueIdsForProject(Long projectId)
                                       throws org.ofbiz.core.entity.GenericEntityException
Returns all issue ids for a particular project. This uses constant memory (i.e. doesn't load all issues into memory.

Parameters:
projectId - Project ID.
Returns:
A collection of issue IDs
Throws:
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.

getIssueCountForProject

long getIssueCountForProject(Long projectId)
Returns the number of issues that exist for the provided project id.

Parameters:
projectId - identifies the project which the issues are associated with
Returns:
a count of how many issues exist in the project

hasUnassignedIssues

boolean hasUnassignedIssues()
Returns a boolean indicating whether there are unassigned issues.

Returns:
a boolean indicating whether there are unassigned issues
Since:
5.1

getUnassignedIssueCount

long getUnassignedIssueCount()
Returns the number of unassigned issues.

Returns:
the number of unassigned issues
Since:
5.1


Copyright © 2002-2013 Atlassian. All Rights Reserved.