com.atlassian.jira.rpc.soap.service
Class IssueServiceImpl

java.lang.Object
  extended by com.atlassian.jira.rpc.soap.service.IssueServiceImpl
All Implemented Interfaces:
IssueService

public class IssueServiceImpl
extends java.lang.Object
implements IssueService


Field Summary
static java.lang.String GENERIC_CONTENT_TYPE
           
 
Constructor Summary
IssueServiceImpl(com.atlassian.jira.security.PermissionManager permissionManager, com.atlassian.jira.project.ProjectManager projectManager, com.atlassian.jira.issue.IssueManager issueManager, com.atlassian.jira.issue.AttachmentManager attachmentManager, com.atlassian.jira.issue.CustomFieldManager customFieldManager, com.atlassian.jira.web.action.issue.IssueCreationHelperBean issueCreationHelperBean, com.atlassian.jira.web.util.OutlookDateManager outlookDateManager, com.atlassian.jira.issue.IssueUtilsBean issueUtilsBean, com.atlassian.jira.security.JiraAuthenticationContext authenticationContext, SoapUtilsBean soapUtilsBean, com.atlassian.jira.config.ConstantsManager constantsManager, com.atlassian.core.util.LocaleUtils localeUtils, com.atlassian.jira.config.properties.ApplicationProperties applicationProperties, com.atlassian.jira.issue.IssueFactory issueFactory, com.atlassian.jira.bc.issue.comment.CommentService commentService, com.atlassian.jira.bc.projectroles.ProjectRoleService projectRoleService, com.atlassian.jira.issue.util.IssueUpdater issueUpdater, com.atlassian.jira.bc.issue.attachment.AttachmentService attachmentService, com.atlassian.jira.bc.issue.worklog.WorklogService worklogService, com.atlassian.jira.util.JiraDurationUtils jiraDurationUtils, com.atlassian.jira.bc.issue.IssueService issueService, com.atlassian.jira.config.SubTaskManager subTaskManager)
           
 
Method Summary
 boolean addAttachmentsToIssue(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, java.lang.String[] fileNames, byte[][] attachments)
           
 void addComment(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, RemoteComment remoteComment)
           
 RemoteWorklog addWorklogAndAutoAdjustRemainingEstimate(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, RemoteWorklog remoteWorklog)
           
 RemoteWorklog addWorklogAndRetainRemainingEstimate(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, RemoteWorklog remoteWorklog)
           
 RemoteWorklog addWorklogWithNewRemainingEstimate(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, RemoteWorklog remoteWorklog, java.lang.String newRemainingEstimate)
          A wrapper to call through to the WorklogService to validate and create a new worklog entry
 RemoteIssue createIssueWithSecurityLevel(com.atlassian.crowd.embedded.api.User user, java.lang.String parentIssueKey, RemoteIssue rIssue, java.lang.Long securityLevelId)
           
 void deleteIssue(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 void deleteWorklogAndAutoAdjustRemainingEstimate(com.atlassian.crowd.embedded.api.User user, java.lang.String remoteWorklogId)
           
 void deleteWorklogAndRetainRemainingEstimate(com.atlassian.crowd.embedded.api.User user, java.lang.String remoteWorklogId)
           
 void deleteWorklogWithNewRemainingEstimate(com.atlassian.crowd.embedded.api.User user, java.lang.String remoteWorklogId, java.lang.String newRemainingEstimate)
           
 RemoteComment editComment(com.atlassian.crowd.embedded.api.User user, RemoteComment remoteComment)
           
 RemoteAttachment[] getAttachmentsFromIssue(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 RemoteNamedObject[] getAvailableActions(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 RemoteComment getComment(com.atlassian.crowd.embedded.api.User user, java.lang.Long commentId)
           
 RemoteComment[] getComments(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 RemoteField[] getFieldsForAction(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, java.lang.String actionIdString)
           
 RemoteField[] getFieldsForCreate(com.atlassian.crowd.embedded.api.User user, java.lang.String projectKey, java.lang.Long issueTypeId)
           
 RemoteField[] getFieldsForEdit(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 RemoteIssue getIssue(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 RemoteIssue getIssueById(com.atlassian.crowd.embedded.api.User user, java.lang.String issueId)
           
 java.util.Date getResolutionDateById(com.atlassian.crowd.embedded.api.User user, java.lang.Long issueId)
          Returns the resolution date given an issue id
 java.util.Date getResolutionDateByKey(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
          Returns the resolution date given an issue key
 RemoteSecurityLevel getSecurityLevel(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
          Returns the current security level for given issue.
 RemoteWorklog[] getWorklogs(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 boolean hasPermissionToCreateWorklog(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey)
           
 boolean hasPermissionToDeleteWorklog(com.atlassian.crowd.embedded.api.User user, java.lang.String worklogId)
           
 boolean hasPermissionToEditComment(com.atlassian.crowd.embedded.api.User user, RemoteComment remoteComment)
           
 boolean hasPermissionToUpdateWorklog(com.atlassian.crowd.embedded.api.User user, java.lang.String worklogId)
           
 RemoteIssue progressWorkflowAction(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, java.lang.String actionIdString, RemoteFieldValue[] actionParams)
           
 RemoteIssue updateIssue(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, java.util.Map actionParams)
           
 RemoteIssue updateIssue(com.atlassian.crowd.embedded.api.User user, java.lang.String issueKey, RemoteFieldValue[] actionParams)
           
 void updateWorklogAndAutoAdjustRemainingEstimate(com.atlassian.crowd.embedded.api.User user, RemoteWorklog remoteWorklog)
           
 void updateWorklogAndRetainRemainingEstimate(com.atlassian.crowd.embedded.api.User user, RemoteWorklog remoteWorklog)
           
 void updateWorklogWithNewRemainingEstimate(com.atlassian.crowd.embedded.api.User user, RemoteWorklog remoteWorklog, java.lang.String newRemainingEstimate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERIC_CONTENT_TYPE

public static final java.lang.String GENERIC_CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

IssueServiceImpl

public IssueServiceImpl(com.atlassian.jira.security.PermissionManager permissionManager,
                        com.atlassian.jira.project.ProjectManager projectManager,
                        com.atlassian.jira.issue.IssueManager issueManager,
                        com.atlassian.jira.issue.AttachmentManager attachmentManager,
                        com.atlassian.jira.issue.CustomFieldManager customFieldManager,
                        com.atlassian.jira.web.action.issue.IssueCreationHelperBean issueCreationHelperBean,
                        com.atlassian.jira.web.util.OutlookDateManager outlookDateManager,
                        com.atlassian.jira.issue.IssueUtilsBean issueUtilsBean,
                        com.atlassian.jira.security.JiraAuthenticationContext authenticationContext,
                        SoapUtilsBean soapUtilsBean,
                        com.atlassian.jira.config.ConstantsManager constantsManager,
                        com.atlassian.core.util.LocaleUtils localeUtils,
                        com.atlassian.jira.config.properties.ApplicationProperties applicationProperties,
                        com.atlassian.jira.issue.IssueFactory issueFactory,
                        com.atlassian.jira.bc.issue.comment.CommentService commentService,
                        com.atlassian.jira.bc.projectroles.ProjectRoleService projectRoleService,
                        com.atlassian.jira.issue.util.IssueUpdater issueUpdater,
                        com.atlassian.jira.bc.issue.attachment.AttachmentService attachmentService,
                        com.atlassian.jira.bc.issue.worklog.WorklogService worklogService,
                        com.atlassian.jira.util.JiraDurationUtils jiraDurationUtils,
                        com.atlassian.jira.bc.issue.IssueService issueService,
                        com.atlassian.jira.config.SubTaskManager subTaskManager)
Method Detail

getIssue

public RemoteIssue getIssue(com.atlassian.crowd.embedded.api.User user,
                            java.lang.String issueKey)
                     throws RemoteException,
                            RemotePermissionException
Specified by:
getIssue in interface IssueService
Throws:
RemoteException
RemotePermissionException

createIssueWithSecurityLevel

public RemoteIssue createIssueWithSecurityLevel(com.atlassian.crowd.embedded.api.User user,
                                                java.lang.String parentIssueKey,
                                                RemoteIssue rIssue,
                                                java.lang.Long securityLevelId)
                                         throws RemotePermissionException,
                                                RemoteValidationException,
                                                RemoteException
Specified by:
createIssueWithSecurityLevel in interface IssueService
Throws:
RemotePermissionException
RemoteValidationException
RemoteException

updateIssue

public RemoteIssue updateIssue(com.atlassian.crowd.embedded.api.User user,
                               java.lang.String issueKey,
                               java.util.Map actionParams)
                        throws RemoteException
Specified by:
updateIssue in interface IssueService
Throws:
RemoteException

updateIssue

public RemoteIssue updateIssue(com.atlassian.crowd.embedded.api.User user,
                               java.lang.String issueKey,
                               RemoteFieldValue[] actionParams)
                        throws RemoteException
Specified by:
updateIssue in interface IssueService
Throws:
RemoteException

getFieldsForCreate

public RemoteField[] getFieldsForCreate(com.atlassian.crowd.embedded.api.User user,
                                        java.lang.String projectKey,
                                        java.lang.Long issueTypeId)
                                 throws RemoteException
Specified by:
getFieldsForCreate in interface IssueService
Throws:
RemoteException

getFieldsForEdit

public RemoteField[] getFieldsForEdit(com.atlassian.crowd.embedded.api.User user,
                                      java.lang.String issueKey)
                               throws RemoteException
Specified by:
getFieldsForEdit in interface IssueService
Throws:
RemoteException

deleteIssue

public void deleteIssue(com.atlassian.crowd.embedded.api.User user,
                        java.lang.String issueKey)
                 throws RemoteException,
                        RemotePermissionException
Specified by:
deleteIssue in interface IssueService
Throws:
RemoteException
RemotePermissionException

getComments

public RemoteComment[] getComments(com.atlassian.crowd.embedded.api.User user,
                                   java.lang.String issueKey)
                            throws RemoteException,
                                   RemotePermissionException
Specified by:
getComments in interface IssueService
Throws:
RemoteException
RemotePermissionException

addComment

public void addComment(com.atlassian.crowd.embedded.api.User user,
                       java.lang.String issueKey,
                       RemoteComment remoteComment)
                throws RemoteException,
                       RemotePermissionException
Specified by:
addComment in interface IssueService
Throws:
RemoteException
RemotePermissionException

hasPermissionToEditComment

public boolean hasPermissionToEditComment(com.atlassian.crowd.embedded.api.User user,
                                          RemoteComment remoteComment)
                                   throws RemoteException
Specified by:
hasPermissionToEditComment in interface IssueService
Throws:
RemoteException

editComment

public RemoteComment editComment(com.atlassian.crowd.embedded.api.User user,
                                 RemoteComment remoteComment)
                          throws RemoteException
Specified by:
editComment in interface IssueService
Throws:
RemoteException

getComment

public RemoteComment getComment(com.atlassian.crowd.embedded.api.User user,
                                java.lang.Long commentId)
                         throws RemoteException
Specified by:
getComment in interface IssueService
Throws:
RemoteException

getAvailableActions

public RemoteNamedObject[] getAvailableActions(com.atlassian.crowd.embedded.api.User user,
                                               java.lang.String issueKey)
                                        throws RemoteException
Specified by:
getAvailableActions in interface IssueService
Throws:
RemoteException

getFieldsForAction

public RemoteField[] getFieldsForAction(com.atlassian.crowd.embedded.api.User user,
                                        java.lang.String issueKey,
                                        java.lang.String actionIdString)
                                 throws RemoteException
Specified by:
getFieldsForAction in interface IssueService
Throws:
RemoteException

progressWorkflowAction

public RemoteIssue progressWorkflowAction(com.atlassian.crowd.embedded.api.User user,
                                          java.lang.String issueKey,
                                          java.lang.String actionIdString,
                                          RemoteFieldValue[] actionParams)
                                   throws RemoteException
Specified by:
progressWorkflowAction in interface IssueService
Throws:
RemoteException

getIssueById

public RemoteIssue getIssueById(com.atlassian.crowd.embedded.api.User user,
                                java.lang.String issueId)
                         throws RemoteException,
                                RemotePermissionException
Specified by:
getIssueById in interface IssueService
Throws:
RemoteException
RemotePermissionException

addAttachmentsToIssue

public boolean addAttachmentsToIssue(com.atlassian.crowd.embedded.api.User user,
                                     java.lang.String issueKey,
                                     java.lang.String[] fileNames,
                                     byte[][] attachments)
                              throws RemoteException
Specified by:
addAttachmentsToIssue in interface IssueService
Throws:
RemoteException

getAttachmentsFromIssue

public RemoteAttachment[] getAttachmentsFromIssue(com.atlassian.crowd.embedded.api.User user,
                                                  java.lang.String issueKey)
                                           throws RemoteException
Specified by:
getAttachmentsFromIssue in interface IssueService
Throws:
RemoteException

addWorklogWithNewRemainingEstimate

public RemoteWorklog addWorklogWithNewRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                        java.lang.String issueKey,
                                                        RemoteWorklog remoteWorklog,
                                                        java.lang.String newRemainingEstimate)
                                                 throws RemoteException,
                                                        RemotePermissionException,
                                                        RemoteValidationException
A wrapper to call through to the WorklogService to validate and create a new worklog entry

Specified by:
addWorklogWithNewRemainingEstimate in interface IssueService
Parameters:
user - the user in play
issueKey - the key of the issue in play
remoteWorklog - the remote worklog data
newRemainingEstimate - a new remaning extimate
Returns:
Created worklog with the id set or null if no worklog was created.
Throws:
RemoteException - if anything goes wrong in general
RemotePermissionException - if the user does not have permission to adda worklog
RemoteValidationException - if the data does not pass validation

addWorklogAndAutoAdjustRemainingEstimate

public RemoteWorklog addWorklogAndAutoAdjustRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                              java.lang.String issueKey,
                                                              RemoteWorklog remoteWorklog)
                                                       throws RemoteException,
                                                              RemotePermissionException,
                                                              RemoteValidationException
Specified by:
addWorklogAndAutoAdjustRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

addWorklogAndRetainRemainingEstimate

public RemoteWorklog addWorklogAndRetainRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                          java.lang.String issueKey,
                                                          RemoteWorklog remoteWorklog)
                                                   throws RemoteException,
                                                          RemotePermissionException,
                                                          RemoteValidationException
Specified by:
addWorklogAndRetainRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

deleteWorklogAndAutoAdjustRemainingEstimate

public void deleteWorklogAndAutoAdjustRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                        java.lang.String remoteWorklogId)
                                                 throws RemoteException,
                                                        RemotePermissionException,
                                                        RemoteValidationException
Specified by:
deleteWorklogAndAutoAdjustRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

deleteWorklogAndRetainRemainingEstimate

public void deleteWorklogAndRetainRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                    java.lang.String remoteWorklogId)
                                             throws RemoteException,
                                                    RemotePermissionException,
                                                    RemoteValidationException
Specified by:
deleteWorklogAndRetainRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

deleteWorklogWithNewRemainingEstimate

public void deleteWorklogWithNewRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                  java.lang.String remoteWorklogId,
                                                  java.lang.String newRemainingEstimate)
                                           throws RemoteException,
                                                  RemotePermissionException,
                                                  RemoteValidationException
Specified by:
deleteWorklogWithNewRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

updateWorklogAndAutoAdjustRemainingEstimate

public void updateWorklogAndAutoAdjustRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                        RemoteWorklog remoteWorklog)
                                                 throws RemoteException,
                                                        RemotePermissionException,
                                                        RemoteValidationException
Specified by:
updateWorklogAndAutoAdjustRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

updateWorklogAndRetainRemainingEstimate

public void updateWorklogAndRetainRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                    RemoteWorklog remoteWorklog)
                                             throws RemoteException,
                                                    RemotePermissionException,
                                                    RemoteValidationException
Specified by:
updateWorklogAndRetainRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

updateWorklogWithNewRemainingEstimate

public void updateWorklogWithNewRemainingEstimate(com.atlassian.crowd.embedded.api.User user,
                                                  RemoteWorklog remoteWorklog,
                                                  java.lang.String newRemainingEstimate)
                                           throws RemoteException,
                                                  RemotePermissionException,
                                                  RemoteValidationException
Specified by:
updateWorklogWithNewRemainingEstimate in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

getWorklogs

public RemoteWorklog[] getWorklogs(com.atlassian.crowd.embedded.api.User user,
                                   java.lang.String issueKey)
                            throws RemoteException,
                                   RemotePermissionException,
                                   RemoteValidationException
Specified by:
getWorklogs in interface IssueService
Throws:
RemoteException
RemotePermissionException
RemoteValidationException

hasPermissionToCreateWorklog

public boolean hasPermissionToCreateWorklog(com.atlassian.crowd.embedded.api.User user,
                                            java.lang.String issueKey)
                                     throws RemoteException,
                                            RemoteValidationException
Specified by:
hasPermissionToCreateWorklog in interface IssueService
Throws:
RemoteException
RemoteValidationException

hasPermissionToDeleteWorklog

public boolean hasPermissionToDeleteWorklog(com.atlassian.crowd.embedded.api.User user,
                                            java.lang.String worklogId)
                                     throws RemoteException,
                                            RemoteValidationException
Specified by:
hasPermissionToDeleteWorklog in interface IssueService
Throws:
RemoteException
RemoteValidationException

hasPermissionToUpdateWorklog

public boolean hasPermissionToUpdateWorklog(com.atlassian.crowd.embedded.api.User user,
                                            java.lang.String worklogId)
                                     throws RemoteException,
                                            RemoteValidationException
Specified by:
hasPermissionToUpdateWorklog in interface IssueService
Throws:
RemoteException
RemoteValidationException

getSecurityLevel

public RemoteSecurityLevel getSecurityLevel(com.atlassian.crowd.embedded.api.User user,
                                            java.lang.String issueKey)
                                     throws RemoteException,
                                            RemotePermissionException
Description copied from interface: IssueService
Returns the current security level for given issue.

If the user has permission to see the issue, but not the security level, null is returned.

Specified by:
getSecurityLevel in interface IssueService
Parameters:
user - user performing this operation
issueKey - the issue key
Returns:
issue security level or null
Throws:
RemoteException - If there was some problem preventing the operation from working.
RemotePermissionException - If the issue key is invalid or the user is not permitted to see this issue.

getResolutionDateByKey

public java.util.Date getResolutionDateByKey(com.atlassian.crowd.embedded.api.User user,
                                             java.lang.String issueKey)
                                      throws RemoteException
Description copied from interface: IssueService
Returns the resolution date given an issue key

Specified by:
getResolutionDateByKey in interface IssueService
Parameters:
user - The user making the request
issueKey - the key of the issue being retrieved
Returns:
the resolution date or null of the issue
Throws:
RemoteException - If the user doesn't have permission to browse the issue or the issue doesn't exist

getResolutionDateById

public java.util.Date getResolutionDateById(com.atlassian.crowd.embedded.api.User user,
                                            java.lang.Long issueId)
                                     throws RemoteException
Description copied from interface: IssueService
Returns the resolution date given an issue id

Specified by:
getResolutionDateById in interface IssueService
Parameters:
user - The user making the request
issueId - the id of the issue being retrieved
Returns:
the resolution date or null of the issue
Throws:
RemoteException - If the user doesn't have permission to browse the issue or the issue doesn't exist


Copyright © 2004-2011 Atlassian. All Rights Reserved.