|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.managers.DefaultIssueManager
public class DefaultIssueManager
Constructor Summary | |
---|---|
DefaultIssueManager(WorkflowManager workflowManager,
com.atlassian.core.ofbiz.association.AssociationManager associationManager,
TextAnalyzer textAnalyzer,
IssueUpdater issueUpdater,
PermissionManager permissionManager)
|
Method Summary | |
---|---|
org.ofbiz.core.entity.GenericValue |
createIssue(java.lang.String remoteUserName,
java.util.Map<java.lang.String,java.lang.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.opensymphony.user.User remoteUser,
Issue issue)
Persists a new issue. |
org.ofbiz.core.entity.GenericValue |
createIssue(com.opensymphony.user.User remoteUser,
java.util.Map<java.lang.String,java.lang.Object> fields)
This function creates an issue in Jira. |
void |
deleteIssue(com.opensymphony.user.User user,
MutableIssue issue,
EventDispatchOption eventDispatchOption,
boolean sendMail)
This method will delete an issue from JIRA. |
protected void |
doUpdate(MutableIssue issue,
org.ofbiz.core.entity.GenericValue originalIssueGV,
EventDispatchOption eventDispatchOption,
com.opensymphony.user.User user,
boolean sendMail,
DefaultIssueChangeHolder issueChangeHolder)
|
java.util.List<org.ofbiz.core.entity.GenericValue> |
getEntitiesByIssue(java.lang.String relationName,
org.ofbiz.core.entity.GenericValue issue)
Get a list of entities (versions, components etc) related to this issue. |
java.util.List<org.ofbiz.core.entity.GenericValue> |
getEntitiesByIssueObject(java.lang.String relationName,
Issue issue)
Get a list of entities (versions, components etc) related to this issue. |
org.ofbiz.core.entity.GenericValue |
getIssue(java.lang.Long id)
Retrieves an issue by its id. |
org.ofbiz.core.entity.GenericValue |
getIssue(java.lang.String key)
Retrieves the issue as a GenericValue with the given key. |
org.ofbiz.core.entity.GenericValue |
getIssueByWorkflow(java.lang.Long wfid)
Retrieves an issue GenericValue given a workflow ID. |
long |
getIssueCountForProject(java.lang.Long projectId)
Returns the number of issues that exist for the provided project id. |
java.util.Collection<java.lang.Long> |
getIssueIdsForProject(java.lang.Long projectId)
Retrieve a collection of all issue ids that belong to a given project. |
MutableIssue |
getIssueObject(java.lang.Long id)
Retrieves an issue by id. |
MutableIssue |
getIssueObject(java.lang.String key)
Retrieves the Issue that has the given key, or null if no such Issue exists. |
MutableIssue |
getIssueObjectByWorkflow(java.lang.Long workflowId)
Retrieves an issue given a workflow ID. |
java.util.List<org.ofbiz.core.entity.GenericValue> |
getIssues(java.util.Collection<java.lang.Long> ids)
Get issues with the following ids. |
java.util.List<org.ofbiz.core.entity.GenericValue> |
getIssuesByEntity(java.lang.String relationName,
org.ofbiz.core.entity.GenericValue entity)
Get a list of issues related to an entity (version, component etc). |
java.util.List<com.opensymphony.user.User> |
getIssueWatchers(org.ofbiz.core.entity.GenericValue issue)
Return a list of users that are watching an issue. |
java.util.List<com.opensymphony.user.User> |
getIssueWatchers(Issue issue)
Return a list of watchers for a particular issue. |
java.util.List<org.ofbiz.core.entity.GenericValue> |
getProjectIssues(org.ofbiz.core.entity.GenericValue project)
Get all the issues for a given project. |
java.util.List<Issue> |
getVotedIssues(com.opensymphony.user.User user)
Get a list of issues that the user has voted on and can see. |
java.util.List<Issue> |
getVotedIssuesOverrideSecurity(com.opensymphony.user.User user)
Get a list of issues that the user has voted on. |
java.util.List<Issue> |
getWatchedIssues(com.opensymphony.user.User user)
Get a list of issues that the user is watching and can see. |
java.util.List<Issue> |
getWatchedIssuesOverrideSecurity(com.opensymphony.user.User user)
Get a list of issues that the user is watching |
boolean |
isEditable(Issue issue)
Returns true if the issue can be edited. |
boolean |
isEditable(Issue issue,
com.opensymphony.user.User user)
Returns true if the issue can be edited by the current user. |
void |
notifyTrackbacks(org.ofbiz.core.entity.GenericValue issue)
|
protected void |
storeIssue(MutableIssue issue)
|
protected DefaultIssueChangeHolder |
updateFieldValues(MutableIssue issue,
java.lang.StringBuffer modifiedText)
|
Issue |
updateIssue(com.opensymphony.user.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 |
---|
public DefaultIssueManager(WorkflowManager workflowManager, com.atlassian.core.ofbiz.association.AssociationManager associationManager, TextAnalyzer textAnalyzer, IssueUpdater issueUpdater, PermissionManager permissionManager)
Method Detail |
---|
public org.ofbiz.core.entity.GenericValue getIssue(java.lang.Long id) throws DataAccessException
IssueManager
getIssue
in interface IssueManager
id
- Issue ID.
GenericValue
.
DataAccessException
- if there is an error in the Data Access Layer.public org.ofbiz.core.entity.GenericValue getIssue(java.lang.String key) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
GenericValue
with the given key.
getIssue
in interface IssueManager
key
- the issue key.
GenericValue
.
org.ofbiz.core.entity.GenericEntityException
- if there is a problem getting the datapublic java.util.List<org.ofbiz.core.entity.GenericValue> getIssues(java.util.Collection<java.lang.Long> ids)
IssueManager
getIssues
in interface IssueManager
ids
- Issue IDs.
GenericValue
spublic java.util.Collection<java.lang.Long> getIssueIdsForProject(java.lang.Long projectId) throws org.ofbiz.core.entity.GenericEntityException
getIssueIdsForProject
in interface IssueManager
projectId
- the id of the project for which to retrieve all issue ids
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.public long getIssueCountForProject(java.lang.Long projectId)
IssueManager
getIssueCountForProject
in interface IssueManager
projectId
- identifies the project which the issues are associated with
public org.ofbiz.core.entity.GenericValue getIssueByWorkflow(java.lang.Long wfid) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
GenericValue
given a workflow ID. This is used when transitioning
through the various steps of a workflow.
getIssueByWorkflow
in interface IssueManager
wfid
- workflow ID.
GenericValue
.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.IssueManager.getIssueObjectByWorkflow(Long)
public MutableIssue getIssueObjectByWorkflow(java.lang.Long workflowId) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getIssueObjectByWorkflow
in interface IssueManager
workflowId
- workflow ID.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.public MutableIssue getIssueObject(java.lang.Long id) throws DataAccessException
IssueManager
getIssueObject
in interface IssueManager
id
- the id
MutableIssue
DataAccessException
- if there is an error in the Data Access Layer.public MutableIssue getIssueObject(java.lang.String key) throws DataAccessException
IssueManager
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.
getIssueObject
in interface IssueManager
key
- The Issue key.
MutableIssue
with the given key, or null if no such Issue exists.
DataAccessException
- if there is an error in the Data Access Layer.public java.util.List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssue(java.lang.String relationName, org.ofbiz.core.entity.GenericValue issue) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getEntitiesByIssue
in interface IssueManager
relationName
- A IssueRelationConstants
string indicating some issue relationissue
- Issue to consider
GenericValue
s associated with the issue.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.public java.util.List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssueObject(java.lang.String relationName, Issue issue) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getEntitiesByIssueObject
in interface IssueManager
relationName
- A IssueRelationConstants
string indicating some issue relationissue
- Issue to consider
GenericValue
s associated with the issue.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.public java.util.List<org.ofbiz.core.entity.GenericValue> getIssuesByEntity(java.lang.String relationName, org.ofbiz.core.entity.GenericValue entity) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getIssuesByEntity
in interface IssueManager
relationName
- A IssueRelationConstants
string indicating some relation of entityentity
- The entity related to the issues we're after
GenericValue
s associated with an entity.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.public org.ofbiz.core.entity.GenericValue createIssue(com.opensymphony.user.User remoteUser, java.util.Map<java.lang.String,java.lang.Object> fields) throws CreateException
createIssue
in interface IssueManager
remoteUser
- User that is creating this issuefields
- see below
System.currentTimeMillis()
System.currentTimeMillis()
CreateException
IssueCreateFunction
public org.ofbiz.core.entity.GenericValue createIssue(com.opensymphony.user.User remoteUser, Issue issue) throws CreateException
IssueManager
createIssue
in interface IssueManager
remoteUser
- Issue creatorissue
- The new issue.
CreateException
- If JIRA is unable to create the issue.public java.util.List<org.ofbiz.core.entity.GenericValue> getProjectIssues(org.ofbiz.core.entity.GenericValue project) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getProjectIssues
in interface IssueManager
project
- the Project
GenericValue
objects
org.ofbiz.core.entity.GenericEntityException
- If there are errors in the persistence layer.public boolean isEditable(Issue issue)
IssueManager
true
if the issue can be edited. This is determined by looking at the workflow step the issue is in.
isEditable
in interface IssueManager
issue
- the Issue.
true
if the issue can be edited. This is determined by looking at the workflow step the issue is in.public boolean isEditable(Issue issue, com.opensymphony.user.User user)
IssueManager
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.
isEditable
in interface IssueManager
issue
- the issue you want to edituser
- the user who will be performing the edit
true
if the user has permission and the issue is in an editable workflow steppublic org.ofbiz.core.entity.GenericValue createIssue(java.lang.String remoteUserName, java.util.Map<java.lang.String,java.lang.Object> fields) throws CreateException
WorkflowManager
to create the issue
createIssue
in interface IssueManager
remoteUserName
- the user who is creating the issuefields
- issue's attribute's
CreateException
- If JIRA is unable to create the issue.createIssue(com.opensymphony.user.User, java.util.Map)
public void notifyTrackbacks(org.ofbiz.core.entity.GenericValue issue)
public java.util.List<Issue> getVotedIssues(com.opensymphony.user.User user) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getVotedIssues
in interface IssueManager
user
- The user.
Issue
objects the user has voted on.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.public java.util.List<Issue> getVotedIssuesOverrideSecurity(com.opensymphony.user.User user) throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getVotedIssuesOverrideSecurity
in interface IssueManager
user
- The user.
Issue
objects the user has voted on.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.public java.util.List<com.opensymphony.user.User> getIssueWatchers(org.ofbiz.core.entity.GenericValue issue) throws org.ofbiz.core.entity.GenericEntityException, com.opensymphony.user.EntityNotFoundException
getIssueWatchers
in interface IssueManager
issue
- The issue
org.ofbiz.core.entity.GenericEntityException
com.opensymphony.user.EntityNotFoundException
public java.util.List<com.opensymphony.user.User> getIssueWatchers(Issue issue) throws org.ofbiz.core.entity.GenericEntityException, com.opensymphony.user.EntityNotFoundException
IssueManager
getIssueWatchers
in interface IssueManager
issue
- the Issue
User
s.
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.
com.opensymphony.user.EntityNotFoundException
- Thrown when User/Group is looked up by name that does not exist.public java.util.List<Issue> getWatchedIssues(com.opensymphony.user.User user) throws org.ofbiz.core.entity.GenericEntityException, com.opensymphony.user.EntityNotFoundException
IssueManager
getWatchedIssues
in interface IssueManager
user
- the User.
Issue
objects
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.
com.opensymphony.user.EntityNotFoundException
- Thrown when User/Group is looked up by name that does not exist.public java.util.List<Issue> getWatchedIssuesOverrideSecurity(com.opensymphony.user.User user) throws org.ofbiz.core.entity.GenericEntityException, com.opensymphony.user.EntityNotFoundException
IssueManager
getWatchedIssuesOverrideSecurity
in interface IssueManager
user
- the User.
Issue
objects
org.ofbiz.core.entity.GenericEntityException
- An exception in the ofbiz Entity Engine.
com.opensymphony.user.EntityNotFoundException
- Thrown when User/Group is looked up by name that does not exist.public Issue updateIssue(com.opensymphony.user.User user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws UpdateException
IssueManager
EventDispatchOption
. This method also allows you to specify if email
notifications should be send to notify users of the update.
updateIssue
in interface IssueManager
user
- who is performing the operationissue
- the issue to updateeventDispatchOption
- 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.
UpdateException
- thrown if something goes horribly wrong when updating the issue.protected void storeIssue(MutableIssue issue)
protected void doUpdate(MutableIssue issue, org.ofbiz.core.entity.GenericValue originalIssueGV, EventDispatchOption eventDispatchOption, com.opensymphony.user.User user, boolean sendMail, DefaultIssueChangeHolder issueChangeHolder) throws UpdateException
UpdateException
protected DefaultIssueChangeHolder updateFieldValues(MutableIssue issue, java.lang.StringBuffer modifiedText)
public void deleteIssue(com.opensymphony.user.User user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws RemoveException
IssueManager
EventDispatchOption
. This method also allows you to specify if email
notifications should be send to notify users of the deletion.
deleteIssue
in interface IssueManager
user
- who is performing the operationissue
- 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.
RemoveException
- throw if something goes horribly wrong when deleting the issue.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |