Class DefaultIssueManager
- All Implemented Interfaces:
IssueManager
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultIssueManager(OfBizDelegator ofBizDelegator, WorkflowManager workflowManager, NodeAssociationStore nodeAssociationStore, UserAssociationStore userAssociationStore, IssueUpdater issueUpdater, PermissionManager permissionManager, MovedIssueKeyStore movedIssueKeyStore, ProjectKeyStore projectKeyStore, IssueTextFieldCharacterLengthValidator issueTextFieldCharacterLengthValidator) -
Method Summary
Modifier and TypeMethodDescriptionarchiveIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) This method will archive the issue.booleanPublic method used internally, not safe to override.org.ofbiz.core.entity.GenericValuecreateIssue(ApplicationUser remoteUser, Issue issue) Persists a new issue.org.ofbiz.core.entity.GenericValuecreateIssue(ApplicationUser remoteUser, Map<String, Object> fields) This function creates an issue in Jira.org.ofbiz.core.entity.GenericValuecreateIssue(String remoteUserName, Map<String, Object> fields) This method is here because this is a logical place for the "createIssue" method to be.createIssueObject(ApplicationUser remoteUser, Issue issue) Creates an issue.createIssueObject(ApplicationUser remoteUser, Map<String, Object> fields) Creates an issue.createIssueObject(String remoteUserName, Map<String, Object> fields) Creates an issue.voiddeleteIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) This method will delete an issue from JIRA.voiddeleteIssue(ApplicationUser user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail) This method will delete an issue from JIRA.voiddeleteIssueNoEvent(Issue issue) Delete issue without firing any events, or sending notifications.voiddeleteIssueNoEvent(MutableIssue issue) Delete issue without firing any events, or sending notifications.protected voiddoUpdate(ApplicationUser user, MutableIssue issue, org.ofbiz.core.entity.GenericValue originalIssueGV, DefaultIssueChangeHolder issueChangeHolder, UpdateIssueRequest updateRequest, Map<String, ModifiedValue> modifiedValueMap) final IssuefindMovedIssue(String originalKey) Returns an issue that has been moved by searching on the old issue key.getAllIssueKeys(Long issueId) Returns all issue keys that are associated withIssue.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.getIdsOfMissingIssues(Set<Long> issueIds) Check existence of issues for the given set of IDsorg.ofbiz.core.entity.GenericValueRetrieves an issue by its id.org.ofbiz.core.entity.GenericValueRetrieves the issue as aGenericValuewith the given key.Retrieves theIssuethat has the given key, or null if no such Issue exists.Retrieves theIssuethat has the given key, or null if no such Issue exists.org.ofbiz.core.entity.GenericValuegetIssueByWorkflow(Long wfid) Retrieves an issueGenericValuegiven a workflow ID.longReturns the number of issues.longgetIssueCountForProject(Long projectId) Returns the number of issues that exist for the provided project id.getIssueIdsForProject(Long projectId) Retrieve a collection of all issue ids that belong to a given project.getIssueObject(Long id) Retrieves an issue by id.getIssueObject(String key) Retrieves theIssuethat has the given key, or null if no such Issue exists.protected MutableIssuegetIssueObject(org.ofbiz.core.entity.GenericValue issueGV) Creates a MutableIssue object from an Issue GenericValue.getIssueObjectByWorkflow(Long workflowId) Retrieves an issue given a workflow ID.getIssueObjects(Collection<Long> ids) Get issues with the following ids.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).getKeysOfMissingIssues(Set<String> issueKeys) Check existence of issues for the given set of keysList<org.ofbiz.core.entity.GenericValue>getProjectIssues(org.ofbiz.core.entity.GenericValue project) Get all the issues for a given project.getProjectIssueTypePairsByIds(Set<Long> issueIds) Returns a set of project ID / issue type combinations that given issue IDs cover.getProjectIssueTypePairsByKeys(Set<String> issueKeys) Returns a set of project ID / issue type combinations that given issue keys cover.longReturns the number of unassigned issues.Get a list of issues that the user has voted on and can see.Get a list of issues that the user has voted on.Get a list of issues that the user is watching and can see.Get a list of issues that the user is watchinggetWatchers(Issue issue) Return a list of watchers for a particular issue.getWatchersFor(Issue issue) Return a list of watchers for a particular issue.booleanReturns a boolean indicating whether there are unassigned issues.booleanisEditable(Issue issue) Returnstrueif the issue can be edited.booleanisEditable(Issue issue, ApplicationUser user) Returnstrueif the issue can be edited by the current user.booleanisEditable(Issue issue, String nextStatusId) Returnstrueif the issue can be edited after action.booleanisExistingIssueKey(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).voidrecordMovedIssueKey(Issue oldIssue) Used internally when we want to record that an Issue has changed its Issue key (because it has moved project).restoreIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) This method will restore an archived issue.protected DefaultIssueChangeHolderupdateFieldValues(MutableIssue issue, StringBuffer ignored) updateIssue(ApplicationUser user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail) This method will store the provided issue to the JIRA datastore.updateIssue(ApplicationUser user, MutableIssue issue, UpdateIssueRequest updateIssueRequest) This method will store the provided issue to the JIRA datastore.
-
Constructor Details
-
DefaultIssueManager
public DefaultIssueManager(OfBizDelegator ofBizDelegator, WorkflowManager workflowManager, NodeAssociationStore nodeAssociationStore, UserAssociationStore userAssociationStore, IssueUpdater issueUpdater, PermissionManager permissionManager, MovedIssueKeyStore movedIssueKeyStore, ProjectKeyStore projectKeyStore, IssueTextFieldCharacterLengthValidator issueTextFieldCharacterLengthValidator)
-
-
Method Details
-
getIssue
Description copied from interface:IssueManagerRetrieves an issue by its id.- Specified by:
getIssuein interfaceIssueManager- 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:IssueManagerRetrieves the issue as aGenericValuewith the given key.- Specified by:
getIssuein interfaceIssueManager- 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:IssueManagerReturns 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:
isExistingIssueKeyin interfaceIssueManager- Throws:
org.ofbiz.core.entity.GenericEntityException
-
getIssues
Description copied from interface:IssueManagerGet issues with the following ids. The issues are sorted in the order that the ids were given in.- Specified by:
getIssuesin interfaceIssueManager- Parameters:
ids- Issue IDs.- Returns:
- A collection of issue
GenericValues
-
getIssueObjects
Description copied from interface:IssueManagerGet 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:
getIssueObjectsin interfaceIssueManager- 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:
getIssueIdsForProjectin interfaceIssueManager- 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
Description copied from interface:IssueManagerReturns the number of issues that exist for the provided project id.- Specified by:
getIssueCountForProjectin interfaceIssueManager- 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:IssueManagerReturns a boolean indicating whether there are unassigned issues.- Specified by:
hasUnassignedIssuesin interfaceIssueManager- Returns:
- a boolean indicating whether there are unassigned issues
-
getUnassignedIssueCount
public long getUnassignedIssueCount()Description copied from interface:IssueManagerReturns the number of unassigned issues.- Specified by:
getUnassignedIssueCountin interfaceIssueManager- Returns:
- the number of unassigned issues
-
getIssueCount
public long getIssueCount()Description copied from interface:IssueManagerReturns the number of issues.- Specified by:
getIssueCountin interfaceIssueManager- Returns:
- the number of issues
-
atLeastOneIssueExists
public boolean atLeastOneIssueExists()Public method used internally, not safe to override.- Specified by:
atLeastOneIssueExistsin interfaceIssueManager- Returns:
- true if an issue exists
-
findMovedIssue
Description copied from interface:IssueManagerReturns an issue that has been moved by searching on the old issue key.- Specified by:
findMovedIssuein interfaceIssueManager- 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
Issueobject
-
recordMovedIssueKey
Description copied from interface:IssueManagerUsed internally when we want to record that an Issue has changed its Issue key (because it has moved project).- Specified by:
recordMovedIssueKeyin interfaceIssueManager- 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:IssueManagerRetrieves an issueGenericValuegiven a workflow ID. This is used when transitioning through the various steps of a workflow.- Specified by:
getIssueByWorkflowin interfaceIssueManager- 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:IssueManagerRetrieves an issue given a workflow ID. This is used when transitioning through the various steps of a workflow.- Specified by:
getIssueObjectByWorkflowin interfaceIssueManager- Parameters:
workflowId- workflow ID.- Returns:
- The Issue
- Throws:
org.ofbiz.core.entity.GenericEntityException- An exception in the ofbiz Entity Engine.
-
getIssueObject
Description copied from interface:IssueManagerRetrieves an issue by id. This method will always return a new instance of an issue.- Specified by:
getIssueObjectin interfaceIssueManager- Parameters:
id- the id- Returns:
- A
MutableIssue - Throws:
DataAccessException- if there is an error in the Data Access Layer.
-
getIssueObject
Description copied from interface:IssueManagerRetrieves theIssuethat 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:
getIssueObjectin interfaceIssueManager- Parameters:
key- The Issue key.- Returns:
- a
MutableIssuewith the given key, or null if no such Issue exists. - Throws:
DataAccessException- if there is an error in the Data Access Layer.
-
getIssueByKeyIgnoreCase
Description copied from interface:IssueManagerRetrieves theIssuethat has the given key, or null if no such Issue exists.This method will ignore case of issue key.
- Specified by:
getIssueByKeyIgnoreCasein interfaceIssueManager- Parameters:
key- The Issue key.- Returns:
- a
MutableIssuewith the given key, or null if no such Issue exists. - Throws:
DataAccessException- if there is an error in the Data Access Layer.
-
getIssueByCurrentKey
Description copied from interface:IssueManagerRetrieves theIssuethat 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:
getIssueByCurrentKeyin interfaceIssueManager- Parameters:
key- The Issue key.- Returns:
- a
MutableIssuewith 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:IssueManagerGet a list of entities (versions, components etc) related to this issue.- Specified by:
getEntitiesByIssuein interfaceIssueManager- Parameters:
relationName- AIssueRelationConstantsstring indicating some issue relationissue- 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:IssueManagerGet a list of entities (versions, components etc) related to this issue.- Specified by:
getEntitiesByIssueObjectin interfaceIssueManager- Parameters:
relationName- AIssueRelationConstantsstring indicating some issue relationissue- 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:IssueManagerGet a list of issues related to an entity (version, component etc).- Specified by:
getIssuesByEntityin interfaceIssueManager- Parameters:
relationName- AIssueRelationConstantsstring indicating some relation of entityentity- 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:IssueManagerGet a list of issues related to an entity (version, component etc).- Specified by:
getIssueObjectsByEntityin interfaceIssueManager- Parameters:
relationName- AIssueRelationConstantsstring indicating some relation of entityentity- 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
Description copied from interface:IssueManagerReturns all issue keys that are associated withIssue.- Specified by:
getAllIssueKeysin interfaceIssueManager- Returns:
- all issue keys (including the current one) associated with the issue
- See Also:
-
com.atlassian.jira.issue.changehistory.ChangeHistoryManager#getPreviousIssueKeys(Long)
-
createIssue
public org.ofbiz.core.entity.GenericValue createIssue(ApplicationUser remoteUser, Map<String, Object> fields) throws CreateExceptionThis 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:
createIssuein interfaceIssueManager- Parameters:
remoteUser- User that is creating this issuefields- see belowRequired 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 toSystem.currentTimeMillis()
updated: The date which the issue was updated. If not specified, defaults toSystem.currentTimeMillis()- Returns:
- A generic value representing the issue created
- Throws:
CreateException- See Also:
-
createIssue
public org.ofbiz.core.entity.GenericValue createIssue(ApplicationUser remoteUser, Issue issue) throws CreateException Description copied from interface:IssueManagerPersists a new issue.- Specified by:
createIssuein interfaceIssueManager- Parameters:
remoteUser- Issue creatorissue- 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:IssueManagerGet all the issues for a given project.- Specified by:
getProjectIssuesin interfaceIssueManager- Parameters:
project- the Project- Returns:
- a List of
GenericValueobjects - Throws:
org.ofbiz.core.entity.GenericEntityException- If there are errors in the persistence layer.
-
isEditable
Description copied from interface:IssueManagerReturnstrueif the issue can be edited. This is determined by looking at the workflow step the issue is in.- Specified by:
isEditablein interfaceIssueManager- Parameters:
issue- the Issue.- Returns:
trueif the issue can be edited. This is determined by looking at the workflow step the issue is in.
-
isEditable
Description copied from interface:IssueManagerReturnstrueif the issue can be edited after action. This is determined by looking at the workflow step the issue will be when action is completed.- Specified by:
isEditablein interfaceIssueManager- Parameters:
issue- the Issue.nextStatusId- the id of the status the issue will be in after transition looking at the workflow status the issue will be in, after the action is completed.
-
isEditable
Description copied from interface:IssueManagerReturnstrueif 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:
isEditablein interfaceIssueManager- Parameters:
issue- the issue you want to edituser- the user who will be performing the edit- Returns:
trueif 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 CreateExceptionThis 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 theWorkflowManagerto create the issue- Specified by:
createIssuein interfaceIssueManager- Parameters:
remoteUserName- the user who is creating the issuefields- issue attributes- Returns:
- the created issue
- Throws:
CreateException- If JIRA is unable to create the issue.- See Also:
-
createIssueObject
public Issue createIssueObject(String remoteUserName, Map<String, Object> fields) throws CreateExceptionDescription copied from interface:IssueManagerCreates an issue.- Specified by:
createIssueObjectin interfaceIssueManager- Parameters:
remoteUserName- Issue creatorfields- 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(ApplicationUser remoteUser, Map<String, Object> fields) throws CreateExceptionDescription copied from interface:IssueManagerCreates an issue.- Specified by:
createIssueObjectin interfaceIssueManager- Parameters:
remoteUser- Issue creatorfields- 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
Description copied from interface:IssueManagerCreates an issue.- Specified by:
createIssueObjectin interfaceIssueManager- Parameters:
remoteUser- Issue creatorissue- The new issue.- Returns:
- the new issue.
- Throws:
CreateException- If JIRA is unable to create the issue.
-
getVotedIssues
Description copied from interface:IssueManagerGet a list of issues that the user has voted on and can see.- Specified by:
getVotedIssuesin interfaceIssueManager- Parameters:
user- The user.- Returns:
- A list of
Issueobjects the user has voted on.
-
getVotedIssuesOverrideSecurity
Description copied from interface:IssueManagerGet a list of issues that the user has voted on.- Specified by:
getVotedIssuesOverrideSecurityin interfaceIssueManager- Parameters:
user- The user.- Returns:
- A list of
Issueobjects the user has voted on.
-
getWatchers
Description copied from interface:IssueManagerReturn a list of watchers for a particular issue.- Specified by:
getWatchersin interfaceIssueManager- Parameters:
issue- the Issue- Returns:
- A list of
Users.
-
getWatchersFor
Description copied from interface:IssueManagerReturn a list of watchers for a particular issue.- Specified by:
getWatchersForin interfaceIssueManager- Parameters:
issue- the Issue- Returns:
- A list of
Users.
-
getWatchedIssues
Description copied from interface:IssueManagerGet a list of issues that the user is watching and can see.- Specified by:
getWatchedIssuesin interfaceIssueManager- Parameters:
user- the User.- Returns:
- A list of
Issueobjects
-
getWatchedIssuesOverrideSecurity
Description copied from interface:IssueManagerGet a list of issues that the user is watching- Specified by:
getWatchedIssuesOverrideSecurityin interfaceIssueManager- Parameters:
user- the User.- Returns:
- A list of
Issueobjects
-
updateIssue
public Issue updateIssue(ApplicationUser user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail) Description copied from interface:IssueManagerThis method will store the provided issue to the JIRA datastore.The issue will be saved and re-indexed unless
EventDispatchOption.DO_NOT_DISPATCHis specified. 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:
updateIssuein interfaceIssueManager- Parameters:
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.- Returns:
- the updated issue.
-
updateIssue
public Issue updateIssue(ApplicationUser user, MutableIssue issue, UpdateIssueRequest updateIssueRequest) Description copied from interface:IssueManagerThis 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.
- Specified by:
updateIssuein interfaceIssueManager- Parameters:
user- who is performing the operationissue- the issue to updateupdateIssueRequest- details about how to perform the update, including user context, event dispatch strategy and history metadata- Returns:
- the updated issue.
- See Also:
-
archiveIssue
public Issue archiveIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws ArchiveException Description copied from interface:IssueManagerThis method will archive the issue.The issue will be marked as archived and removed from current index. This method performs archiving licence check and permission checks.
This method also allows you to specify if email notifications should be send to notify users of the update.
- Specified by:
archiveIssuein interfaceIssueManager- Parameters:
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.- Returns:
- the archived issue.
- Throws:
ArchiveException
-
restoreIssue
public Issue restoreIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws ArchiveException Description copied from interface:IssueManagerThis method will restore an archived issue.The issue will be moved back to index. This method performs archiving licence check and permission checks.
This method also allows you to specify if email notifications should be send to notify users of the update.
- Specified by:
restoreIssuein interfaceIssueManager- Parameters:
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.- Returns:
- the archived issue.
- Throws:
ArchiveException
-
doUpdate
protected void doUpdate(ApplicationUser user, MutableIssue issue, org.ofbiz.core.entity.GenericValue originalIssueGV, DefaultIssueChangeHolder issueChangeHolder, UpdateIssueRequest updateRequest, Map<String, ModifiedValue> modifiedValueMap) -
updateFieldValues
-
deleteIssue
public void deleteIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws RemoveException Description copied from interface:IssueManagerThis 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:
deleteIssuein interfaceIssueManager- Parameters:
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.- Throws:
RemoveException- throw if something goes horribly wrong when deleting the issue.
-
deleteIssue
public void deleteIssue(ApplicationUser user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws RemoveException Description copied from interface:IssueManagerThis 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:
deleteIssuein interfaceIssueManager- Parameters:
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.- Throws:
RemoveException- throw if something goes horribly wrong when deleting the issue.
-
deleteIssueNoEvent
Description copied from interface:IssueManagerDelete 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)- Specified by:
deleteIssueNoEventin interfaceIssueManager- 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
Description copied from interface:IssueManagerDelete 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)- Specified by:
deleteIssueNoEventin interfaceIssueManager- 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)
-
getIssueObject
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).
-
getProjectIssueTypePairsByKeys
@Nonnull public Set<Pair<Long,String>> getProjectIssueTypePairsByKeys(@Nonnull Set<String> issueKeys) Description copied from interface:IssueManagerReturns a set of project ID / issue type combinations that given issue keys cover.- Specified by:
getProjectIssueTypePairsByKeysin interfaceIssueManager- Parameters:
issueKeys- Set of issue keys- Returns:
- Project ID / issue type pairs
-
getProjectIssueTypePairsByIds
Description copied from interface:IssueManagerReturns a set of project ID / issue type combinations that given issue IDs cover.- Specified by:
getProjectIssueTypePairsByIdsin interfaceIssueManager- Parameters:
issueIds- Set of issue IDs- Returns:
- Project ID / issue type pairs
-
getKeysOfMissingIssues
Description copied from interface:IssueManagerCheck existence of issues for the given set of keys- Specified by:
getKeysOfMissingIssuesin interfaceIssueManager- Parameters:
issueKeys- Set of issue keys- Returns:
- Set of invalid keys or the ones that don't represent an issue
-
getIdsOfMissingIssues
Description copied from interface:IssueManagerCheck existence of issues for the given set of IDs- Specified by:
getIdsOfMissingIssuesin interfaceIssueManager- Parameters:
issueIds- Set of issue IDs- Returns:
- Set of IDs that don't represent an issue
-