com.atlassian.jira.issue.managers
Class DefaultIssueManager

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

public class DefaultIssueManager
extends Object
implements IssueManager


Constructor Summary
DefaultIssueManager(OfBizDelegator ofBizDelegator, WorkflowManager workflowManager, NodeAssociationStore nodeAssociationStore, UserAssociationStore userAssociationStore, IssueUpdater issueUpdater, PermissionManager permissionManager, MovedIssueKeyStore movedIssueKeyStore)
           
 
Method Summary
 org.ofbiz.core.entity.GenericValue createIssue(String remoteUserName, Map<String,Object> fields)
          This method is here because this is a logical place for the "createIssue" method to be.
 org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser, Issue issue)
          Persists a new issue.
 org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser, Map<String,Object> fields)
          This function creates an issue in Jira.
 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)
          This method will delete an issue from JIRA.
 void deleteIssueNoEvent(Issue issue)
          Delete issue without firing any events, or sending notifications.
 void deleteIssueNoEvent(MutableIssue issue)
          Delete issue without firing any events, or sending notifications.
protected  void doUpdate(MutableIssue issue, org.ofbiz.core.entity.GenericValue originalIssueGV, EventDispatchOption eventDispatchOption, com.atlassian.crowd.embedded.api.User user, boolean sendMail, DefaultIssueChangeHolder issueChangeHolder)
           
 Issue findMovedIssue(String originalKey)
          Returns an issue that has been moved by searching on the old issue key.
 Set<String> getAllIssueKeys(Long issueId)
          Returns all issue keys that are associated with Issue.
 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)
          Retrieves an issue by its id.
 org.ofbiz.core.entity.GenericValue getIssue(String key)
          Retrieves the issue as a GenericValue with the given key.
 MutableIssue getIssueByCurrentKey(String key)
          Retrieves the Issue that has the given key, or null if no such Issue exists.
 MutableIssue getIssueByKeyIgnoreCase(String key)
          Retrieves the Issue that has the given key, or null if no such Issue exists.
 org.ofbiz.core.entity.GenericValue getIssueByWorkflow(Long wfid)
          Retrieves an issue GenericValue given a workflow ID.
 long getIssueCountForProject(Long projectId)
          Returns the number of issues that exist for the provided project id.
 Collection<Long> getIssueIdsForProject(Long projectId)
          Retrieve a collection of all issue ids that belong to a given project.
protected  MutableIssue getIssueObject(org.ofbiz.core.entity.GenericValue issueGV)
          Creates a MutableIssue object from an Issue GenericValue.
 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)
          Get issues with the following ids.
 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)
          Get all the issues for a given project.
 long getUnassignedIssueCount()
          Returns the number of unassigned issues.
 List<Issue> getVotedIssues(ApplicationUser user)
          Get a list of issues that the user has voted on and can see.
 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(ApplicationUser user)
          Get a list of issues that the user has voted on.
 List<Issue> getVotedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
          Get a list of issues that the user has voted on.
 List<Issue> getWatchedIssues(ApplicationUser user)
          Get a list of issues that the user is watching and can see.
 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(ApplicationUser user)
          Get a list of issues that the user is watching
 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.
 List<ApplicationUser> getWatchersFor(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.
 boolean isExistingIssueKey(String issueKey)
          Returns true if issue with a given key exists (it looks for issues having current issue key set for the value, and moved issue keys that used the key).
 void recordMovedIssueKey(Issue oldIssue)
          Used internally when we want to record that an Issue has changed its Issue key (because it has moved project).
protected  DefaultIssueChangeHolder updateFieldValues(MutableIssue issue, StringBuffer modifiedText)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIssueManager

public DefaultIssueManager(OfBizDelegator ofBizDelegator,
                           WorkflowManager workflowManager,
                           NodeAssociationStore nodeAssociationStore,
                           UserAssociationStore userAssociationStore,
                           IssueUpdater issueUpdater,
                           PermissionManager permissionManager,
                           MovedIssueKeyStore movedIssueKeyStore)
Method Detail

getIssue

public org.ofbiz.core.entity.GenericValue getIssue(Long id)
                                            throws DataAccessException
Description copied from interface: IssueManager
Retrieves an issue by its id.

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

getIssue

public org.ofbiz.core.entity.GenericValue getIssue(String key)
                                            throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: IssueManager
Retrieves the issue as a GenericValue with the given key.

Specified by:
getIssue in interface IssueManager
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

isExistingIssueKey

public boolean isExistingIssueKey(String issueKey)
                           throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: IssueManager
Returns true if issue with a given key exists (it looks for issues having current issue key set for the value, and moved issue keys that used the key).

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

getIssues

public List<org.ofbiz.core.entity.GenericValue> getIssues(Collection<Long> ids)
Description copied from interface: IssueManager
Get issues with the following ids. The issues are sorted in the order that the ids were given in.

Specified by:
getIssues in interface IssueManager
Parameters:
ids - Issue IDs.
Returns:
A collection of issue GenericValues

getIssueObjects

public List<Issue> getIssueObjects(Collection<Long> ids)
Description copied from interface: IssueManager
Get issues with the following ids. The issues are sorted in the order that the ids were given in. Any ids that are not found will be missing from the list. That is list will not contains nulls.

Specified by:
getIssueObjects in interface IssueManager
Parameters:
ids - Issue IDs.
Returns:
A collection of issue MutableIssues

getIssueIdsForProject

public Collection<Long> getIssueIdsForProject(Long projectId)
                                       throws org.ofbiz.core.entity.GenericEntityException
Retrieve a collection of all issue ids that belong to a given project.

Specified by:
getIssueIdsForProject in interface IssueManager
Parameters:
projectId - the id of the project for which to retrieve all issue ids
Returns:
A collection of issue IDs
Throws:
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.

getIssueCountForProject

public long getIssueCountForProject(Long projectId)
Description copied from interface: IssueManager
Returns the number of issues that exist for the provided project id.

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

hasUnassignedIssues

public boolean hasUnassignedIssues()
Description copied from interface: IssueManager
Returns a boolean indicating whether there are unassigned issues.

Specified by:
hasUnassignedIssues in interface IssueManager
Returns:
a boolean indicating whether there are unassigned issues

getUnassignedIssueCount

public long getUnassignedIssueCount()
Description copied from interface: IssueManager
Returns the number of unassigned issues.

Specified by:
getUnassignedIssueCount in interface IssueManager
Returns:
the number of unassigned issues

findMovedIssue

public Issue findMovedIssue(String originalKey)
Description copied from interface: IssueManager
Returns an issue that has been moved by searching on the old issue key.

Specified by:
findMovedIssue in interface IssueManager
Parameters:
originalKey - the original key of an issue that has since been moved (moving between projects assigns a new key to an issue)
Returns:
the moved Issue object

recordMovedIssueKey

public void recordMovedIssueKey(Issue oldIssue)
Description copied from interface: IssueManager
Used internally when we want to record that an Issue has changed its Issue key (because it has moved project).

Specified by:
recordMovedIssueKey in interface IssueManager
Parameters:
oldIssue - The issue with it's old issue key

getIssueByWorkflow

public org.ofbiz.core.entity.GenericValue getIssueByWorkflow(Long wfid)
                                                      throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: IssueManager
Retrieves an issue GenericValue given a workflow ID. This is used when transitioning through the various steps of a workflow.

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

getIssueObjectByWorkflow

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

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

getIssueObject

public MutableIssue getIssueObject(Long id)
                            throws DataAccessException
Description copied from interface: IssueManager
Retrieves an issue by id. This method will always return a new instance of an issue.

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

getIssueObject

public MutableIssue getIssueObject(String key)
                            throws DataAccessException
Description copied from interface: IssueManager
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.

Specified by:
getIssueObject in interface IssueManager
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.

getIssueByKeyIgnoreCase

public MutableIssue getIssueByKeyIgnoreCase(String key)
                                     throws DataAccessException
Description copied from interface: IssueManager
Retrieves the Issue that has the given key, or null if no such Issue exists.

This method will ignore case of issue key.

Specified by:
getIssueByKeyIgnoreCase in interface IssueManager
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.

getIssueByCurrentKey

public MutableIssue getIssueByCurrentKey(String key)
                                  throws DataAccessException
Description copied from interface: IssueManager
Retrieves the Issue that has the given key, or null if no such Issue exists.

This method will strictly only return the issue which has current issue key equal to the one given.

Specified by:
getIssueByCurrentKey in interface IssueManager
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.

getEntitiesByIssue

public List<org.ofbiz.core.entity.GenericValue> 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 - An exception in the ofbiz Entity Engine.

getEntitiesByIssueObject

public List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssueObject(String relationName,
                                                                         Issue 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:
getEntitiesByIssueObject 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 - An exception in the ofbiz Entity Engine.

getIssuesByEntity

public List<org.ofbiz.core.entity.GenericValue> 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 - An exception in the ofbiz Entity Engine.

getIssueObjectsByEntity

public List<Issue> getIssueObjectsByEntity(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:
getIssueObjectsByEntity 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 MutableIssues associated with an entity.
Throws:
org.ofbiz.core.entity.GenericEntityException - if it failed to get the list of issues.

getAllIssueKeys

public Set<String> getAllIssueKeys(Long issueId)
Description copied from interface: IssueManager
Returns all issue keys that are associated with Issue.

Specified by:
getAllIssueKeys in interface IssueManager
Returns:
all issue keys (including the current one) associated with the issue

createIssue

public org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser,
                                                      Map<String,Object> fields)
                                               throws CreateException
This function creates an issue in Jira. Read the javadoc under the fields parameter to see what object need to be passed to create an issue.

Specified by:
createIssue in interface IssueManager
Parameters:
remoteUser - User that is creating this issue
fields - see below

Required Fields

projectId: A Long value representing the id of the project
issueType: The String id of an issueType
summary: A String describing the issue (max 255 chars)

Recomended Fields

assignee: A String representing the username of the assignee
reporter: A String representing the username of the reporter
priority: The String id of a priority

Optional Fields

description: A String description of the issue
environment: A String description of the environment the issue is in. e.g W2K
fixVersions: A List of Long values representing fixVersion ids
components: A List of Long values representing component ids
timeOriginalEstimate: A Long value representing the number of seconds this tast should take
timeEstimate: A Long value representing the number of seconds allocated for this issue
versions: = A List of Long value representing version ids
customFields: A Map with the CustomField as the key and Transport Object of the CF as the value
created: The date which the issue was created. If not specified, defaults to System.currentTimeMillis()
updated: The date which the issue was updated. If not specified, defaults to System.currentTimeMillis()
Returns:
A generic value representing the issue created
Throws:
CreateException
See Also:
IssueCreateFunction

createIssue

public org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser,
                                                      Issue issue)
                                               throws CreateException
Description copied from interface: IssueManager
Persists a new issue.

Specified by:
createIssue in interface IssueManager
Parameters:
remoteUser - Issue creator
issue - The new issue.
Returns:
GenericValue representing the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

getProjectIssues

public List<org.ofbiz.core.entity.GenericValue> 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
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

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

Specified by:
isEditable in interface IssueManager
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

public boolean isEditable(Issue issue,
                          com.atlassian.crowd.embedded.api.User user)
Description copied from interface: IssueManager
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.

Specified by:
isEditable in interface IssueManager
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

createIssue

public org.ofbiz.core.entity.GenericValue createIssue(String remoteUserName,
                                                      Map<String,Object> fields)
                                               throws CreateException
This method is here because this is a logical place for the "createIssue" method to be. As the issues are actually created using workflow, the current implementation of this method uses the WorkflowManager to create the issue

Specified by:
createIssue in interface IssueManager
Parameters:
remoteUserName - the user who is creating the issue
fields - issue's attribute's
Returns:
the created issue
Throws:
CreateException - If JIRA is unable to create the issue.
See Also:
createIssue(User, java.util.Map)

createIssueObject

public Issue createIssueObject(String remoteUserName,
                               Map<String,Object> fields)
                        throws CreateException
Description copied from interface: IssueManager
Creates an issue.

Specified by:
createIssueObject 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:
representing the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

createIssueObject

public Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser,
                               Map<String,Object> fields)
                        throws CreateException
Description copied from interface: IssueManager
Creates an issue.

Specified by:
createIssueObject 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:
the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

createIssueObject

public Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser,
                               Issue issue)
                        throws CreateException
Description copied from interface: IssueManager
Creates an issue.

Specified by:
createIssueObject in interface IssueManager
Parameters:
remoteUser - Issue creator
issue - The new issue.
Returns:
the new issue.
Throws:
CreateException - If JIRA is unable to create the issue.

getVotedIssues

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

Specified by:
getVotedIssues in interface IssueManager
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

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

Specified by:
getVotedIssuesOverrideSecurity in interface IssueManager
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.

getVotedIssues

public List<Issue> getVotedIssues(ApplicationUser user)
Description copied from interface: IssueManager
Get a list of issues that the user has voted on and can see.

Specified by:
getVotedIssues in interface IssueManager
Parameters:
user - The user.
Returns:
A list of Issue objects the user has voted on.

getVotedIssuesOverrideSecurity

public List<Issue> getVotedIssuesOverrideSecurity(ApplicationUser user)
Description copied from interface: IssueManager
Get a list of issues that the user has voted on.

Specified by:
getVotedIssuesOverrideSecurity in interface IssueManager
Parameters:
user - The user.
Returns:
A list of Issue objects the user has voted on.

getWatchers

public List<com.atlassian.crowd.embedded.api.User> getWatchers(Issue issue)
Description copied from interface: IssueManager
Return a list of watchers for a particular issue.

Specified by:
getWatchers in interface IssueManager
Parameters:
issue - the Issue
Returns:
A list of Users.

getWatchersFor

public List<ApplicationUser> getWatchersFor(Issue issue)
Description copied from interface: IssueManager
Return a list of watchers for a particular issue.

Specified by:
getWatchersFor in interface IssueManager
Parameters:
issue - the Issue
Returns:
A list of Users.

getWatchedIssues

public List<Issue> getWatchedIssues(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: IssueManager
Get a list of issues that the user is watching and can see.

Specified by:
getWatchedIssues in interface IssueManager
Parameters:
user - the User.
Returns:
A list of Issue objects

getWatchedIssuesOverrideSecurity

public List<Issue> getWatchedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: IssueManager
Get a list of issues that the user is watching

Specified by:
getWatchedIssuesOverrideSecurity in interface IssueManager
Parameters:
user - the User.
Returns:
A list of Issue objects

getWatchedIssues

public List<Issue> getWatchedIssues(ApplicationUser user)
Description copied from interface: IssueManager
Get a list of issues that the user is watching and can see.

Specified by:
getWatchedIssues in interface IssueManager
Parameters:
user - the User.
Returns:
A list of Issue objects

getWatchedIssuesOverrideSecurity

public List<Issue> getWatchedIssuesOverrideSecurity(ApplicationUser user)
Description copied from interface: IssueManager
Get a list of issues that the user is watching

Specified by:
getWatchedIssuesOverrideSecurity in interface IssueManager
Parameters:
user - the User.
Returns:
A list of Issue objects

updateIssue

public Issue updateIssue(com.atlassian.crowd.embedded.api.User user,
                         MutableIssue issue,
                         EventDispatchOption eventDispatchOption,
                         boolean sendMail)
Description copied from interface: IssueManager
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.

Specified by:
updateIssue in interface IssueManager
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.

doUpdate

protected void doUpdate(MutableIssue issue,
                        org.ofbiz.core.entity.GenericValue originalIssueGV,
                        EventDispatchOption eventDispatchOption,
                        com.atlassian.crowd.embedded.api.User user,
                        boolean sendMail,
                        DefaultIssueChangeHolder issueChangeHolder)

updateFieldValues

protected DefaultIssueChangeHolder updateFieldValues(MutableIssue issue,
                                                     StringBuffer modifiedText)

deleteIssue

public void deleteIssue(com.atlassian.crowd.embedded.api.User user,
                        Issue issue,
                        EventDispatchOption eventDispatchOption,
                        boolean sendMail)
                 throws RemoveException
Description copied from interface: IssueManager
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.

Specified by:
deleteIssue in interface IssueManager
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.

deleteIssue

public void deleteIssue(com.atlassian.crowd.embedded.api.User user,
                        MutableIssue issue,
                        EventDispatchOption eventDispatchOption,
                        boolean sendMail)
                 throws RemoveException
Description copied from interface: IssueManager
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.

Specified by:
deleteIssue in interface IssueManager
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.

deleteIssueNoEvent

public void deleteIssueNoEvent(Issue issue)
                        throws RemoveException
Description copied from interface: IssueManager
Delete issue without firing any events, or sending notifications.

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

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

deleteIssueNoEvent

public void deleteIssueNoEvent(MutableIssue issue)
                        throws RemoveException
Description copied from interface: IssueManager
Delete issue without firing any events, or sending notifications.

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

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

getIssueObject

protected MutableIssue getIssueObject(org.ofbiz.core.entity.GenericValue issueGV)
Creates a MutableIssue object from an Issue GenericValue.

If a null GenericValue is passed, then null is returned.

Parameters:
issueGV - the Issue GenericValue.
Returns:
the MutableIssue Object (will be null if issueGV is null).


Copyright © 2002-2013 Atlassian. All Rights Reserved.