com.atlassian.jira.bc.issue.link
Class DefaultRemoteIssueLinkService

java.lang.Object
  extended by com.atlassian.jira.bc.issue.link.DefaultRemoteIssueLinkService
All Implemented Interfaces:
RemoteIssueLinkService

public class DefaultRemoteIssueLinkService
extends Object
implements RemoteIssueLinkService

The default implementation of the RemoteIssueLinkService.

Since:
v5.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.bc.issue.link.RemoteIssueLinkService
RemoteIssueLinkService.CreateValidationResult, RemoteIssueLinkService.DeleteByGlobalIdValidationResult, RemoteIssueLinkService.DeleteValidationResult, RemoteIssueLinkService.RemoteIssueLinkListResult, RemoteIssueLinkService.RemoteIssueLinkResult, RemoteIssueLinkService.UpdateValidationResult
 
Constructor Summary
DefaultRemoteIssueLinkService(RemoteIssueLinkManager remoteIssueLinkManager, IssueService issueService, IssueManager issueManager, IssueLinkManager issueLinkManager, I18nHelper.BeanFactory beanFactory, PermissionManager permissionManager)
           
 
Method Summary
 RemoteIssueLinkService.RemoteIssueLinkResult create(ApplicationUser user, RemoteIssueLinkService.CreateValidationResult createValidationResult)
          Stores the given remote issue link in the JIRA datastore, if the current user has permission to do so.
 RemoteIssueLinkService.RemoteIssueLinkResult create(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.CreateValidationResult createValidationResult)
          Stores the given remote issue link in the JIRA datastore, if the current user has permission to do so.
 void delete(ApplicationUser user, RemoteIssueLinkService.DeleteValidationResult deleteValidationResult)
          Deletes the remote issue link with the given id from the JIRA datastore, if the current user has permission to do so.
 void delete(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.DeleteValidationResult deleteValidationResult)
          Deletes the remote issue link with the given id from the JIRA datastore, if the current user has permission to do so.
 void deleteByGlobalId(ApplicationUser user, RemoteIssueLinkService.DeleteByGlobalIdValidationResult validationResult)
          Deletes the remote issue link that links with the given JIRA issue and has the given global id, if the current user has permission to do so.
 void deleteByGlobalId(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.DeleteByGlobalIdValidationResult validationResult)
          Deletes the remote issue link that links with the given JIRA issue and has the given global id, if the current user has permission to do so.
 RemoteIssueLinkService.RemoteIssueLinkListResult findRemoteIssueLinksByGlobalId(ApplicationUser user, Collection<String> globalIds)
          Retrieves the list of remote issue links that have any of the given globalIds.
 RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLink(ApplicationUser user, Long remoteIssueLinkId)
          Retrieves the remote issue link with the given id.
 RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLink(com.atlassian.crowd.embedded.api.User user, Long remoteIssueLinkId)
          Retrieves the remote issue link with the given id.
 RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLinkByGlobalId(ApplicationUser user, Issue issue, String globalId)
          Retrieves the remote issue link that links with the given JIRA issue and has the given globalId.
 RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLinkByGlobalId(com.atlassian.crowd.embedded.api.User user, Issue issue, String globalId)
          Retrieves the remote issue link that links with the given JIRA issue and has the given globalId.
 RemoteIssueLinkService.RemoteIssueLinkListResult getRemoteIssueLinksForIssue(ApplicationUser user, Issue issue)
          Retrieves the remote issue links that link with the given JIRA issue.
 RemoteIssueLinkService.RemoteIssueLinkListResult getRemoteIssueLinksForIssue(com.atlassian.crowd.embedded.api.User user, Issue issue)
          Retrieves the remote issue links that link with the given JIRA issue.
 RemoteIssueLinkService.RemoteIssueLinkResult update(ApplicationUser user, RemoteIssueLinkService.UpdateValidationResult updateValidationResult)
          Updates the given remote issue link in the JIRA datastore, if the current user has permission to do so.
 RemoteIssueLinkService.RemoteIssueLinkResult update(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.UpdateValidationResult updateValidationResult)
          Updates the given remote issue link in the JIRA datastore, if the current user has permission to do so.
 RemoteIssueLinkService.CreateValidationResult validateCreate(ApplicationUser user, RemoteIssueLink remoteIssueLink)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.CreateValidationResult that can be passed to the RemoteIssueLinkService.create(User, CreateValidationResult) method.
 RemoteIssueLinkService.CreateValidationResult validateCreate(com.atlassian.crowd.embedded.api.User user, RemoteIssueLink remoteIssueLink)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.CreateValidationResult that can be passed to the RemoteIssueLinkService.create(User, CreateValidationResult) method.
 RemoteIssueLinkService.DeleteValidationResult validateDelete(ApplicationUser user, Long remoteIssueLinkId)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteValidationResult that can be passed to the RemoteIssueLinkService.delete(User, DeleteValidationResult) method.
 RemoteIssueLinkService.DeleteValidationResult validateDelete(com.atlassian.crowd.embedded.api.User user, Long remoteIssueLinkId)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteValidationResult that can be passed to the RemoteIssueLinkService.delete(User, DeleteValidationResult) method.
 RemoteIssueLinkService.DeleteByGlobalIdValidationResult validateDeleteByGlobalId(ApplicationUser user, Issue issue, String globalId)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteByGlobalIdValidationResult that can be passed to the RemoteIssueLinkService.deleteByGlobalId(User, DeleteByGlobalIdValidationResult) method.
 RemoteIssueLinkService.DeleteByGlobalIdValidationResult validateDeleteByGlobalId(com.atlassian.crowd.embedded.api.User user, Issue issue, String globalId)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteByGlobalIdValidationResult that can be passed to the RemoteIssueLinkService.deleteByGlobalId(User, DeleteByGlobalIdValidationResult) method.
 RemoteIssueLinkService.UpdateValidationResult validateUpdate(ApplicationUser user, RemoteIssueLink remoteIssueLink)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.UpdateValidationResult that can be passed to the RemoteIssueLinkService.update(User, UpdateValidationResult) method.
 RemoteIssueLinkService.UpdateValidationResult validateUpdate(com.atlassian.crowd.embedded.api.User user, RemoteIssueLink remoteIssueLink)
          Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.UpdateValidationResult that can be passed to the RemoteIssueLinkService.update(User, UpdateValidationResult) method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRemoteIssueLinkService

public DefaultRemoteIssueLinkService(RemoteIssueLinkManager remoteIssueLinkManager,
                                     IssueService issueService,
                                     IssueManager issueManager,
                                     IssueLinkManager issueLinkManager,
                                     I18nHelper.BeanFactory beanFactory,
                                     PermissionManager permissionManager)
Method Detail

getRemoteIssueLink

public RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLink(com.atlassian.crowd.embedded.api.User user,
                                                                       Long remoteIssueLinkId)
Description copied from interface: RemoteIssueLinkService
Retrieves the remote issue link with the given id.

Specified by:
getRemoteIssueLink in interface RemoteIssueLinkService
Parameters:
user - who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLinkId - the database ID of the remote issue link
Returns:
a result object containing a RemoteIssueLink if all went well. If there was an error the remote issue link will be null and the error collection will contain details of what went wrong. Some possible error cases include a remote issue link with the given id not existing, issue linking being disabled, or the user not having Permissions.BROWSE permission for the linked issue.

getRemoteIssueLink

public RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLink(ApplicationUser user,
                                                                       Long remoteIssueLinkId)
Description copied from interface: RemoteIssueLinkService
Retrieves the remote issue link with the given id.

Specified by:
getRemoteIssueLink in interface RemoteIssueLinkService
Parameters:
user - who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLinkId - the database ID of the remote issue link
Returns:
a result object containing a RemoteIssueLink if all went well. If there was an error the remote issue link will be null and the error collection will contain details of what went wrong. Some possible error cases include a remote issue link with the given id not existing, issue linking being disabled, or the user not having Permissions.BROWSE permission for the linked issue.

getRemoteIssueLinksForIssue

public RemoteIssueLinkService.RemoteIssueLinkListResult getRemoteIssueLinksForIssue(com.atlassian.crowd.embedded.api.User user,
                                                                                    Issue issue)
Description copied from interface: RemoteIssueLinkService
Retrieves the remote issue links that link with the given JIRA issue.

Specified by:
getRemoteIssueLinksForIssue in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
issue - the issue to get the remote issue links for
Returns:
a result object containing a List of RemoteIssueLinks if all went well. If no remote issue links are stored against the issue, the list will be empty. If there was an error the remote issue links list will be null and the error collection will contain details of what went wrong. Some possible error cases include the given issue not existing, linking being disabled, or the user not having Permissions.BROWSE permission for the linked issue.

getRemoteIssueLinksForIssue

public RemoteIssueLinkService.RemoteIssueLinkListResult getRemoteIssueLinksForIssue(ApplicationUser user,
                                                                                    Issue issue)
Description copied from interface: RemoteIssueLinkService
Retrieves the remote issue links that link with the given JIRA issue.

Specified by:
getRemoteIssueLinksForIssue in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
issue - the issue to get the remote issue links for
Returns:
a result object containing a List of RemoteIssueLinks if all went well. If no remote issue links are stored against the issue, the list will be empty. If there was an error the remote issue links list will be null and the error collection will contain details of what went wrong. Some possible error cases include the given issue not existing, linking being disabled, or the user not having Permissions.BROWSE permission for the linked issue.

getRemoteIssueLinkByGlobalId

public RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLinkByGlobalId(com.atlassian.crowd.embedded.api.User user,
                                                                                 Issue issue,
                                                                                 String globalId)
Description copied from interface: RemoteIssueLinkService
Retrieves the remote issue link that links with the given JIRA issue and has the given globalId.

Specified by:
getRemoteIssueLinkByGlobalId in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
issue - the issue to get the remote issue link for
globalId - the globalId to get the remote issue link for
Returns:
a result object containing a RemoteIssueLink if all went well. If there was an error the remote issue link will be null and the error collection will contain details of what went wrong. Some possible error cases include a remote issue link with the given globalId not existing, issue linking being disabled, or the user not having Permissions.BROWSE permission for the linked issue.

getRemoteIssueLinkByGlobalId

public RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLinkByGlobalId(ApplicationUser user,
                                                                                 Issue issue,
                                                                                 String globalId)
Description copied from interface: RemoteIssueLinkService
Retrieves the remote issue link that links with the given JIRA issue and has the given globalId.

Specified by:
getRemoteIssueLinkByGlobalId in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
issue - the issue to get the remote issue link for
globalId - the globalId to get the remote issue link for
Returns:
a result object containing a RemoteIssueLink if all went well. If there was an error the remote issue link will be null and the error collection will contain details of what went wrong. Some possible error cases include a remote issue link with the given globalId not existing, issue linking being disabled, or the user not having Permissions.BROWSE permission for the linked issue.

findRemoteIssueLinksByGlobalId

public RemoteIssueLinkService.RemoteIssueLinkListResult findRemoteIssueLinksByGlobalId(ApplicationUser user,
                                                                                       Collection<String> globalIds)
Description copied from interface: RemoteIssueLinkService
Retrieves the list of remote issue links that have any of the given globalIds.

Specified by:
findRemoteIssueLinksByGlobalId in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
globalIds - the globalIds to get the remote issue links for. Should not contain null values.
Returns:
a result object containing a List of RemoteIssueLinks if all went well. If no remote issue links are stored with any of the given globalIds, the list will be empty. If there was an error the remote issue links list will be null and the error collection will contain details of what went wrong. Some possible error cases include the given collection of globalIds is empty, issue linking being disabled, the user not having permissions, or any of the globalIds is null. Permissions.BROWSE permission for the linked issue.

validateCreate

public RemoteIssueLinkService.CreateValidationResult validateCreate(com.atlassian.crowd.embedded.api.User user,
                                                                    RemoteIssueLink remoteIssueLink)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.CreateValidationResult that can be passed to the RemoteIssueLinkService.create(User, CreateValidationResult) method.

If any validation fails the result will contain a null RemoteIssueLink.

Specified by:
validateCreate in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLink - the remote issue link to create
Returns:
a CreateValidationResult, if all validation and permission passes it will contains a validated RemoteIssueLink, otherwise the RemoteIssueLink will be null. The result also contains an error collection that will contain any error messages that may have been generated when performing the operation.

validateCreate

public RemoteIssueLinkService.CreateValidationResult validateCreate(ApplicationUser user,
                                                                    RemoteIssueLink remoteIssueLink)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.CreateValidationResult that can be passed to the RemoteIssueLinkService.create(User, CreateValidationResult) method.

If any validation fails the result will contain a null RemoteIssueLink.

Specified by:
validateCreate in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLink - the remote issue link to create
Returns:
a CreateValidationResult, if all validation and permission passes it will contains a validated RemoteIssueLink, otherwise the RemoteIssueLink will be null. The result also contains an error collection that will contain any error messages that may have been generated when performing the operation.

create

public RemoteIssueLinkService.RemoteIssueLinkResult create(com.atlassian.crowd.embedded.api.User user,
                                                           RemoteIssueLinkService.CreateValidationResult createValidationResult)
Description copied from interface: RemoteIssueLinkService
Stores the given remote issue link in the JIRA datastore, if the current user has permission to do so.

Specified by:
create in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
createValidationResult - contains the remote issue link to store. This should have been created by the RemoteIssueLinkService.validateCreate(User, RemoteIssueLink) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException.
Returns:
a result object containing the persisted RemoteIssueLink if all went well. If there was an error creating the remote issue link then the remote issue link will be null and the error collection will contain details of what went wrong.

create

public RemoteIssueLinkService.RemoteIssueLinkResult create(ApplicationUser user,
                                                           RemoteIssueLinkService.CreateValidationResult createValidationResult)
Description copied from interface: RemoteIssueLinkService
Stores the given remote issue link in the JIRA datastore, if the current user has permission to do so.

Specified by:
create in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
createValidationResult - contains the remote issue link to store. This should have been created by the RemoteIssueLinkService.validateCreate(User, RemoteIssueLink) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException.
Returns:
a result object containing the persisted RemoteIssueLink if all went well. If there was an error creating the remote issue link then the remote issue link will be null and the error collection will contain details of what went wrong.

validateUpdate

public RemoteIssueLinkService.UpdateValidationResult validateUpdate(com.atlassian.crowd.embedded.api.User user,
                                                                    RemoteIssueLink remoteIssueLink)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.UpdateValidationResult that can be passed to the RemoteIssueLinkService.update(User, UpdateValidationResult) method.

Remote link are updated using all of the values in the given remote issue link object. Null values are written as null, and must adhere to the required field constraints.

If any validation fails the result will contain a null RemoteIssueLink.

Specified by:
validateUpdate in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLink - the remote issue link to update
Returns:
an UpdateValidationResult, if all validation and permission passes it will contains a validated RemoteIssueLink, otherwise the RemoteIssueLink will be null. The result also contains an error collection that will contain any error messages that may have been generated when performing the operation.

validateUpdate

public RemoteIssueLinkService.UpdateValidationResult validateUpdate(ApplicationUser user,
                                                                    RemoteIssueLink remoteIssueLink)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.UpdateValidationResult that can be passed to the RemoteIssueLinkService.update(User, UpdateValidationResult) method.

Remote link are updated using all of the values in the given remote issue link object. Null values are written as null, and must adhere to the required field constraints.

If any validation fails the result will contain a null RemoteIssueLink.

Specified by:
validateUpdate in interface RemoteIssueLinkService
Parameters:
user - user who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLink - the remote issue link to update
Returns:
an UpdateValidationResult, if all validation and permission passes it will contains a validated RemoteIssueLink, otherwise the RemoteIssueLink will be null. The result also contains an error collection that will contain any error messages that may have been generated when performing the operation.

update

public RemoteIssueLinkService.RemoteIssueLinkResult update(com.atlassian.crowd.embedded.api.User user,
                                                           RemoteIssueLinkService.UpdateValidationResult updateValidationResult)
Description copied from interface: RemoteIssueLinkService
Updates the given remote issue link in the JIRA datastore, if the current user has permission to do so.

Specified by:
update in interface RemoteIssueLinkService
Parameters:
user - user user who the permission checks will be run against (can be null, indicating an anonymous user).
updateValidationResult - contains the remote issue link to update. This should have been created by the RemoteIssueLinkService.validateUpdate(User, RemoteIssueLink) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException. The remote issue link is updated using all of the values in this object. Null values are written as null, and must adhere to the required field constraints.
Returns:
a result object containing the updated RemoteIssueLink if all went well. If there was an error updating the remote issue link then the remote issue link will be null and the error collection will contain details of what went wrong.

update

public RemoteIssueLinkService.RemoteIssueLinkResult update(ApplicationUser user,
                                                           RemoteIssueLinkService.UpdateValidationResult updateValidationResult)
Description copied from interface: RemoteIssueLinkService
Updates the given remote issue link in the JIRA datastore, if the current user has permission to do so.

Specified by:
update in interface RemoteIssueLinkService
Parameters:
user - user user who the permission checks will be run against (can be null, indicating an anonymous user).
updateValidationResult - contains the remote issue link to update. This should have been created by the RemoteIssueLinkService.validateUpdate(User, RemoteIssueLink) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException. The remote issue link is updated using all of the values in this object. Null values are written as null, and must adhere to the required field constraints.
Returns:
a result object containing the updated RemoteIssueLink if all went well. If there was an error updating the remote issue link then the remote issue link will be null and the error collection will contain details of what went wrong.

validateDelete

public RemoteIssueLinkService.DeleteValidationResult validateDelete(com.atlassian.crowd.embedded.api.User user,
                                                                    Long remoteIssueLinkId)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteValidationResult that can be passed to the RemoteIssueLinkService.delete(User, DeleteValidationResult) method.

Specified by:
validateDelete in interface RemoteIssueLinkService
Parameters:
user - who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLinkId - the id of the remote issue link to delete
Returns:
a DeleteValidationResult, if all validation and permission passes it will contains a validated remote issue link id, otherwise the remote issue link id will be null.

validateDelete

public RemoteIssueLinkService.DeleteValidationResult validateDelete(ApplicationUser user,
                                                                    Long remoteIssueLinkId)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteValidationResult that can be passed to the RemoteIssueLinkService.delete(User, DeleteValidationResult) method.

Specified by:
validateDelete in interface RemoteIssueLinkService
Parameters:
user - who the permission checks will be run against (can be null, indicating an anonymous user).
remoteIssueLinkId - the id of the remote issue link to delete
Returns:
a DeleteValidationResult, if all validation and permission passes it will contains a validated remote issue link id, otherwise the remote issue link id will be null.

delete

public void delete(com.atlassian.crowd.embedded.api.User user,
                   RemoteIssueLinkService.DeleteValidationResult deleteValidationResult)
Description copied from interface: RemoteIssueLinkService
Deletes the remote issue link with the given id from the JIRA datastore, if the current user has permission to do so.

Specified by:
delete in interface RemoteIssueLinkService
Parameters:
user - user user who the permission checks will be run against (can be null, indicating an anonymous user).
deleteValidationResult - contains the remote issue link id to delete. This should have been created by the RemoteIssueLinkService.validateDelete(User, Long) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException.

delete

public void delete(ApplicationUser user,
                   RemoteIssueLinkService.DeleteValidationResult deleteValidationResult)
Description copied from interface: RemoteIssueLinkService
Deletes the remote issue link with the given id from the JIRA datastore, if the current user has permission to do so.

Specified by:
delete in interface RemoteIssueLinkService
Parameters:
user - user user who the permission checks will be run against (can be null, indicating an anonymous user).
deleteValidationResult - contains the remote issue link id to delete. This should have been created by the RemoteIssueLinkService.validateDelete(User, Long) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException.

validateDeleteByGlobalId

public RemoteIssueLinkService.DeleteByGlobalIdValidationResult validateDeleteByGlobalId(com.atlassian.crowd.embedded.api.User user,
                                                                                        Issue issue,
                                                                                        String globalId)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteByGlobalIdValidationResult that can be passed to the RemoteIssueLinkService.deleteByGlobalId(User, DeleteByGlobalIdValidationResult) method.

Specified by:
validateDeleteByGlobalId in interface RemoteIssueLinkService
Parameters:
user - who the permission checks will be run against (can be null, indicating an anonymous user).
issue - the issue to get the remote issue link for
globalId - the global id to get the remote issue link for
Returns:
a DeleteValidationResult, if all validation and permission passes it will contains a validated remote issue link global id, otherwise the remote issue link global id will be null.

validateDeleteByGlobalId

public RemoteIssueLinkService.DeleteByGlobalIdValidationResult validateDeleteByGlobalId(ApplicationUser user,
                                                                                        Issue issue,
                                                                                        String globalId)
Description copied from interface: RemoteIssueLinkService
Validates parameters and checks permissions, and if all checks pass it will create a RemoteIssueLinkService.DeleteByGlobalIdValidationResult that can be passed to the RemoteIssueLinkService.deleteByGlobalId(User, DeleteByGlobalIdValidationResult) method.

Specified by:
validateDeleteByGlobalId in interface RemoteIssueLinkService
Parameters:
user - who the permission checks will be run against (can be null, indicating an anonymous user).
issue - the issue to get the remote issue link for
globalId - the global id to get the remote issue link for
Returns:
a DeleteValidationResult, if all validation and permission passes it will contains a validated remote issue link global id, otherwise the remote issue link global id will be null.

deleteByGlobalId

public void deleteByGlobalId(com.atlassian.crowd.embedded.api.User user,
                             RemoteIssueLinkService.DeleteByGlobalIdValidationResult validationResult)
Description copied from interface: RemoteIssueLinkService
Deletes the remote issue link that links with the given JIRA issue and has the given global id, if the current user has permission to do so.

Specified by:
deleteByGlobalId in interface RemoteIssueLinkService
Parameters:
user - user user who the permission checks will be run against (can be null, indicating an anonymous user).
validationResult - contains the remote issue link id to delete. This should have been created by the RemoteIssueLinkService.validateDeleteByGlobalId(User, Issue, String) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException.

deleteByGlobalId

public void deleteByGlobalId(ApplicationUser user,
                             RemoteIssueLinkService.DeleteByGlobalIdValidationResult validationResult)
Description copied from interface: RemoteIssueLinkService
Deletes the remote issue link that links with the given JIRA issue and has the given global id, if the current user has permission to do so.

Specified by:
deleteByGlobalId in interface RemoteIssueLinkService
Parameters:
user - user user who the permission checks will be run against (can be null, indicating an anonymous user).
validationResult - contains the remote issue link id to delete. This should have been created by the RemoteIssueLinkService.validateDeleteByGlobalId(User, Issue, String) method. The result must have ServiceResult.isValid() return true. If false this method will throw an IllegalStateException.


Copyright © 2002-2014 Atlassian. All Rights Reserved.