|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.issue.managers.DefaultIssueManager
public class DefaultIssueManager
| Constructor Summary | |
|---|---|
DefaultIssueManager(OfBizDelegator ofBizDelegator,
WorkflowManager workflowManager,
AssociationManager associationManager,
TextAnalyzer textAnalyzer,
UserAssociationStore userAssociationStore,
IssueUpdater issueUpdater,
PermissionManager permissionManager)
|
|
| 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,
MutableIssue issue,
EventDispatchOption eventDispatchOption,
boolean sendMail)
This method will delete an issue from JIRA. |
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)
|
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. |
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. |
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. |
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 |
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. |
void |
notifyTrackbacks(org.ofbiz.core.entity.GenericValue issue)
|
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 |
|---|
public DefaultIssueManager(OfBizDelegator ofBizDelegator,
WorkflowManager workflowManager,
AssociationManager associationManager,
TextAnalyzer textAnalyzer,
UserAssociationStore userAssociationStore,
IssueUpdater issueUpdater,
PermissionManager permissionManager)
| Method Detail |
|---|
public org.ofbiz.core.entity.GenericValue getIssue(Long id)
throws DataAccessException
IssueManager
getIssue in interface IssueManagerid - Issue ID.
GenericValue.
DataAccessException - if there is an error in the Data Access Layer.
public org.ofbiz.core.entity.GenericValue getIssue(String key)
throws org.ofbiz.core.entity.GenericEntityException
IssueManagerGenericValue with the given key.
getIssue in interface IssueManagerkey - the issue key.
GenericValue.
org.ofbiz.core.entity.GenericEntityException - if there is a problem getting the datapublic List<org.ofbiz.core.entity.GenericValue> getIssues(Collection<Long> ids)
IssueManager
getIssues in interface IssueManagerids - Issue IDs.
GenericValuespublic List<Issue> getIssueObjects(Collection<Long> ids)
IssueManager
getIssueObjects in interface IssueManagerids - Issue IDs.
MutableIssues
public Collection<Long> getIssueIdsForProject(Long projectId)
throws org.ofbiz.core.entity.GenericEntityException
getIssueIdsForProject in interface IssueManagerprojectId - 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(Long projectId)
IssueManager
getIssueCountForProject in interface IssueManagerprojectId - identifies the project which the issues are associated with
public org.ofbiz.core.entity.GenericValue getIssueByWorkflow(Long wfid)
throws org.ofbiz.core.entity.GenericEntityException
IssueManagerGenericValue given a workflow ID. This is used when transitioning
through the various steps of a workflow.
getIssueByWorkflow in interface IssueManagerwfid - workflow ID.
GenericValue.
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.
public MutableIssue getIssueObjectByWorkflow(Long workflowId)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getIssueObjectByWorkflow in interface IssueManagerworkflowId - workflow ID.
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.
public MutableIssue getIssueObject(Long id)
throws DataAccessException
IssueManager
getIssueObject in interface IssueManagerid - the id
MutableIssue
DataAccessException - if there is an error in the Data Access Layer.
public MutableIssue getIssueObject(String key)
throws DataAccessException
IssueManagerIssue 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 IssueManagerkey - 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 List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssue(String relationName,
org.ofbiz.core.entity.GenericValue issue)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getEntitiesByIssue in interface IssueManagerrelationName - A IssueRelationConstants string indicating some issue relationissue - Issue to consider
GenericValues associated with the issue.
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.
public List<org.ofbiz.core.entity.GenericValue> getEntitiesByIssueObject(String relationName,
Issue issue)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getEntitiesByIssueObject in interface IssueManagerrelationName - A IssueRelationConstants string indicating some issue relationissue - Issue to consider
GenericValues associated with the issue.
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.
public List<org.ofbiz.core.entity.GenericValue> getIssuesByEntity(String relationName,
org.ofbiz.core.entity.GenericValue entity)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getIssuesByEntity in interface IssueManagerrelationName - A IssueRelationConstants string indicating some relation of entityentity - The entity related to the issues we're after
GenericValues associated with an entity.
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.
public List<Issue> getIssueObjectsByEntity(String relationName,
org.ofbiz.core.entity.GenericValue entity)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getIssueObjectsByEntity in interface IssueManagerrelationName - A IssueRelationConstants string indicating some relation of entityentity - The entity related to the issues we're after
MutableIssues associated with an entity.
org.ofbiz.core.entity.GenericEntityException - if it failed to get the list of issues.
public org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser,
Map<String,Object> fields)
throws CreateException
createIssue in interface IssueManagerremoteUser - User that is creating this issuefields - see below
System.currentTimeMillis()System.currentTimeMillis()CreateExceptionIssueCreateFunction
public org.ofbiz.core.entity.GenericValue createIssue(com.atlassian.crowd.embedded.api.User remoteUser,
Issue issue)
throws CreateException
IssueManager
createIssue in interface IssueManagerremoteUser - Issue creatorissue - The new issue.
CreateException - If JIRA is unable to create the issue.
public List<org.ofbiz.core.entity.GenericValue> getProjectIssues(org.ofbiz.core.entity.GenericValue project)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getProjectIssues in interface IssueManagerproject - the Project
GenericValue objects
org.ofbiz.core.entity.GenericEntityException - If there are errors in the persistence layer.public boolean isEditable(Issue issue)
IssueManagertrue if the issue can be edited. This is determined by looking at the workflow step the issue is in.
isEditable in interface IssueManagerissue - 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.atlassian.crowd.embedded.api.User user)
IssueManagertrue 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 IssueManagerissue - 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 step
public org.ofbiz.core.entity.GenericValue createIssue(String remoteUserName,
Map<String,Object> fields)
throws CreateException
WorkflowManager
to create the issue
createIssue in interface IssueManagerremoteUserName - the user who is creating the issuefields - issue's attribute's
CreateException - If JIRA is unable to create the issue.createIssue(User, java.util.Map)
public Issue createIssueObject(String remoteUserName,
Map<String,Object> fields)
throws CreateException
IssueManager
createIssueObject in interface IssueManagerremoteUserName - Issue creatorfields - A map of the issue's immediate field values. See the Issue definition in entitymodel.xml for values.
CreateException - If JIRA is unable to create the issue.
public Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser,
Map<String,Object> fields)
throws CreateException
IssueManager
createIssueObject in interface IssueManagerremoteUser - Issue creatorfields - A map of the issue's immediate field values. See the Issue definition in entitymodel.xml for values.
CreateException - If JIRA is unable to create the issue.
public Issue createIssueObject(com.atlassian.crowd.embedded.api.User remoteUser,
Issue issue)
throws CreateException
IssueManager
createIssueObject in interface IssueManagerremoteUser - Issue creatorissue - The new issue.
CreateException - If JIRA is unable to create the issue.public void notifyTrackbacks(org.ofbiz.core.entity.GenericValue issue)
public List<Issue> getVotedIssues(com.atlassian.crowd.embedded.api.User user)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getVotedIssues in interface IssueManageruser - The user.
Issue objects the user has voted on.
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.
public List<Issue> getVotedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
throws org.ofbiz.core.entity.GenericEntityException
IssueManager
getVotedIssuesOverrideSecurity in interface IssueManageruser - The user.
Issue objects the user has voted on.
org.ofbiz.core.entity.GenericEntityException - An exception in the ofbiz Entity Engine.public List<com.atlassian.crowd.embedded.api.User> getWatchers(Issue issue)
IssueManager
getWatchers in interface IssueManagerissue - the Issue
Users.public List<Issue> getWatchedIssues(com.atlassian.crowd.embedded.api.User user)
IssueManager
getWatchedIssues in interface IssueManageruser - the User.
Issue objectspublic List<Issue> getWatchedIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user)
IssueManager
getWatchedIssuesOverrideSecurity in interface IssueManageruser - the User.
Issue objects
public Issue updateIssue(com.atlassian.crowd.embedded.api.User user,
MutableIssue issue,
EventDispatchOption eventDispatchOption,
boolean sendMail)
throws UpdateException
IssueManagerEventDispatchOption. This method also allows you to specify if email
notifications should be send to notify users of the update.
updateIssue in interface IssueManageruser - 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 doUpdate(MutableIssue issue,
org.ofbiz.core.entity.GenericValue originalIssueGV,
EventDispatchOption eventDispatchOption,
com.atlassian.crowd.embedded.api.User user,
boolean sendMail,
DefaultIssueChangeHolder issueChangeHolder)
throws UpdateException
UpdateException
protected DefaultIssueChangeHolder updateFieldValues(MutableIssue issue,
StringBuffer modifiedText)
public void deleteIssue(com.atlassian.crowd.embedded.api.User user,
MutableIssue issue,
EventDispatchOption eventDispatchOption,
boolean sendMail)
throws RemoveException
IssueManagerEventDispatchOption. This method also allows you to specify if email
notifications should be send to notify users of the deletion.
deleteIssue in interface IssueManageruser - 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.
public void deleteIssueNoEvent(MutableIssue issue)
throws RemoveException
IssueManager
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)
deleteIssueNoEvent in interface IssueManagerissue - issue to delete
RemoveException - if the removal failsIssueManager.deleteIssue(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.issue.MutableIssue, com.atlassian.jira.event.type.EventDispatchOption, boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||