|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface RemoteIssueLinkService
This is used to perform create, update and delete operations in JIRA with remote issue links
. This
service's methods will make sure that when dealing with remote issue links
that all of JIRA's business
rules are enforced. This means that permissions and data validation will be checked, proper events will be fired,
and notifications will be triggered.
Nested Class Summary | |
---|---|
static class |
RemoteIssueLinkService.CreateValidationResult
Holds the information about validating a create remote issue link operation. |
static class |
RemoteIssueLinkService.DeleteByGlobalIdValidationResult
Holds the information about validating a delete remote issue link operation. |
static class |
RemoteIssueLinkService.DeleteValidationResult
Holds the information about validating a delete remote issue link operation. |
static class |
RemoteIssueLinkService.RemoteIssueLinkListResult
Holds the information about performing a remote issue link operation, when a list result is expected. |
static class |
RemoteIssueLinkService.RemoteIssueLinkResult
Holds the information about performing a remote issue link operation. |
static class |
RemoteIssueLinkService.UpdateValidationResult
Holds the information about validating an update remote issue link operation. |
Method Detail |
---|
RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLink(com.atlassian.crowd.embedded.api.User user, Long remoteIssueLinkId)
getRemoteIssueLink(com.atlassian.jira.user.ApplicationUser, Long)
instead.
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
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.RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLink(ApplicationUser user, Long remoteIssueLinkId)
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
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.RemoteIssueLinkService.RemoteIssueLinkListResult getRemoteIssueLinksForIssue(com.atlassian.crowd.embedded.api.User user, Issue issue)
getRemoteIssueLinksForIssue(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue)
instead.
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
RemoteIssueLink
s 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.RemoteIssueLinkService.RemoteIssueLinkListResult getRemoteIssueLinksForIssue(ApplicationUser user, Issue issue)
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
RemoteIssueLink
s 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.RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLinkByGlobalId(com.atlassian.crowd.embedded.api.User user, Issue issue, String globalId)
getRemoteIssueLinkByGlobalId(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, String)
instead.
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 forglobalId
- the globalId to get the remote issue link for
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.RemoteIssueLinkService.RemoteIssueLinkResult getRemoteIssueLinkByGlobalId(ApplicationUser user, Issue issue, String globalId)
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 forglobalId
- the globalId to get the remote issue link for
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.RemoteIssueLinkService.RemoteIssueLinkListResult findRemoteIssueLinksByGlobalId(ApplicationUser user, Collection<String> globalIds)
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.
RemoteIssueLink
s 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.RemoteIssueLinkService.CreateValidationResult validateCreate(com.atlassian.crowd.embedded.api.User user, RemoteIssueLink remoteIssueLink)
validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.link.RemoteIssueLink)
instead.
RemoteIssueLinkService.CreateValidationResult
that can be passed to the create(User, CreateValidationResult)
method.
If any validation fails the result will contain a null RemoteIssueLink.
user
- user who the permission checks will be run against (can be null, indicating an anonymous user).remoteIssueLink
- the remote issue link to create
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.RemoteIssueLinkService.CreateValidationResult validateCreate(ApplicationUser user, RemoteIssueLink remoteIssueLink)
RemoteIssueLinkService.CreateValidationResult
that can be passed to the create(User, CreateValidationResult)
method.
If any validation fails the result will contain a null RemoteIssueLink.
user
- user who the permission checks will be run against (can be null, indicating an anonymous user).remoteIssueLink
- the remote issue link to create
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.RemoteIssueLinkService.RemoteIssueLinkResult create(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.CreateValidationResult createValidationResult)
create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.issue.link.RemoteIssueLinkService.CreateValidationResult)
instead.
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
validateCreate(User, RemoteIssueLink)
method. The result must have
ServiceResult.isValid()
return true. If false this method will throw an
IllegalStateException.
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.RemoteIssueLinkService.RemoteIssueLinkResult create(ApplicationUser user, RemoteIssueLinkService.CreateValidationResult createValidationResult)
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
validateCreate(User, RemoteIssueLink)
method. The result must have
ServiceResult.isValid()
return true. If false this method will throw an
IllegalStateException.
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.RemoteIssueLinkService.UpdateValidationResult validateUpdate(com.atlassian.crowd.embedded.api.User user, RemoteIssueLink remoteIssueLink)
validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.link.RemoteIssueLink)
instead.
RemoteIssueLinkService.UpdateValidationResult
that can be passed to the 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.
user
- user who the permission checks will be run against (can be null, indicating an anonymous user).remoteIssueLink
- the remote issue link to update
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.RemoteIssueLinkService.UpdateValidationResult validateUpdate(ApplicationUser user, RemoteIssueLink remoteIssueLink)
RemoteIssueLinkService.UpdateValidationResult
that can be passed to the 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.
user
- user who the permission checks will be run against (can be null, indicating an anonymous user).remoteIssueLink
- the remote issue link to update
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.RemoteIssueLinkService.RemoteIssueLinkResult update(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.UpdateValidationResult updateValidationResult)
update(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.issue.link.RemoteIssueLinkService.UpdateValidationResult)
instead.
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
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.
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.RemoteIssueLinkService.RemoteIssueLinkResult update(ApplicationUser user, RemoteIssueLinkService.UpdateValidationResult updateValidationResult)
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
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.
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.RemoteIssueLinkService.DeleteValidationResult validateDelete(com.atlassian.crowd.embedded.api.User user, Long remoteIssueLinkId)
validateDelete(com.atlassian.jira.user.ApplicationUser, Long)
instead.
RemoteIssueLinkService.DeleteValidationResult
that can be passed to the delete(User, DeleteValidationResult)
method.
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
RemoteIssueLinkService.DeleteValidationResult validateDelete(ApplicationUser user, Long remoteIssueLinkId)
RemoteIssueLinkService.DeleteValidationResult
that can be passed to the delete(User, DeleteValidationResult)
method.
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
void delete(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.DeleteValidationResult deleteValidationResult)
delete(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.issue.link.RemoteIssueLinkService.DeleteValidationResult)
instead.
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
validateDelete(User, Long)
method. The result must have
ServiceResult.isValid()
return true. If false this method will throw an
IllegalStateException.void delete(ApplicationUser user, RemoteIssueLinkService.DeleteValidationResult deleteValidationResult)
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
validateDelete(User, Long)
method. The result must have
ServiceResult.isValid()
return true. If false this method will throw an
IllegalStateException.RemoteIssueLinkService.DeleteByGlobalIdValidationResult validateDeleteByGlobalId(com.atlassian.crowd.embedded.api.User user, Issue issue, String globalId)
validateDeleteByGlobalId(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, String)
instead.
RemoteIssueLinkService.DeleteByGlobalIdValidationResult
that can be passed to the
deleteByGlobalId(User, DeleteByGlobalIdValidationResult)
method.
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 forglobalId
- the global id to get the remote issue link for
RemoteIssueLinkService.DeleteByGlobalIdValidationResult validateDeleteByGlobalId(ApplicationUser user, Issue issue, String globalId)
RemoteIssueLinkService.DeleteByGlobalIdValidationResult
that can be passed to the
deleteByGlobalId(User, DeleteByGlobalIdValidationResult)
method.
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 forglobalId
- the global id to get the remote issue link for
void deleteByGlobalId(com.atlassian.crowd.embedded.api.User user, RemoteIssueLinkService.DeleteByGlobalIdValidationResult deleteValidationResult)
deleteByGlobalId(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.issue.link.RemoteIssueLinkService.DeleteByGlobalIdValidationResult)
instead.
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
validateDeleteByGlobalId(User, Issue, String)
method. The result must have
ServiceResult.isValid()
return true. If false this method will throw an
IllegalStateException.void deleteByGlobalId(ApplicationUser user, RemoteIssueLinkService.DeleteByGlobalIdValidationResult deleteValidationResult)
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
validateDeleteByGlobalId(User, Issue, String)
method. The result must have
ServiceResult.isValid()
return true. If false this method will throw an
IllegalStateException.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |