Package com.atlassian.jira.rest.v2.issue
Class RemoteIssueLinkResource
java.lang.Object
com.atlassian.jira.rest.v2.issue.RemoteIssueLinkResource
Responsible for handling REST calls relating to remote issue links.
- Since:
- v5.0
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteIssueLinkResource(RemoteIssueLinkService remoteIssueLinkService, BeanBuilderFactory beanBuilderFactory, I18nHelper i18n, JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.applinks.api.ApplicationLinkService applicationLinkService) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringjavax.ws.rs.core.ResponsecreateOrUpdateRemoteIssueLink(Issue issue, RemoteIssueLinkCreateOrUpdateRequest request, javax.ws.rs.core.UriInfo contextUriInfo) Creates or updates a remote issue link from a JSON representation.createReciprocalRemoteIssueLink(Issue sourceIssue, RemoteReciprocalIssueLinkCreateRequest request, javax.ws.rs.core.UriInfo contextUriInfo) javax.ws.rs.core.ResponsedeleteRemoteIssueLinkByGlobalId(Issue issue, String globalId) javax.ws.rs.core.ResponsedeleteRemoteIssueLinkById(Issue issue, String idString) Deletes a remote issue link.extractIssueId(String globalId) javax.ws.rs.core.ResponsegetRemoteIssueLinkById(Issue issue, String idString) Gets the remote issue link with the given id for the given issue.javax.ws.rs.core.ResponsegetRemoteIssueLinks(Issue issue, String globalId) Gets all the remote issue links for the given issue, and filter by the other parameters.javax.ws.rs.core.ResponseupdateRemoteIssueLink(Issue issue, String idString, RemoteIssueLinkCreateOrUpdateRequest request) Updates a remote issue link.void
-
Constructor Details
-
RemoteIssueLinkResource
@Inject public RemoteIssueLinkResource(RemoteIssueLinkService remoteIssueLinkService, BeanBuilderFactory beanBuilderFactory, I18nHelper i18n, JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.applinks.api.ApplicationLinkService applicationLinkService)
-
-
Method Details
-
getRemoteIssueLinks
Gets all the remote issue links for the given issue, and filter by the other parameters.- Parameters:
issue- the issueglobalId- if not null, return only the remote issue link with this globalId- Returns:
- a Response containing a List of RemoteIssueLinkBeans, or the error details if something went wrong
-
getRemoteIssueLinkById
Gets the remote issue link with the given id for the given issue.- Parameters:
issue- the issueidString- the id of the remote issue link- Returns:
- a Response containing a RemoteIssueLinkBean, or the error details if something went wrong
-
createOrUpdateRemoteIssueLink
public javax.ws.rs.core.Response createOrUpdateRemoteIssueLink(Issue issue, RemoteIssueLinkCreateOrUpdateRequest request, javax.ws.rs.core.UriInfo contextUriInfo) Creates or updates a remote issue link from a JSON representation. If a globalId is provided and a remote issue link exists with that globalId, the remote issue link is updated. Otherwise, the remote issue link is created.- Parameters:
issue- the issue to create the link withrequest- the request, containing the values of the remote issue link to be created/updatedcontextUriInfo- uri context, for building the self link- Returns:
- a Response containing a RemoteIssueLinkCreateOrUpdateResponse, or the error details if something went wrong
-
createReciprocalRemoteIssueLink
public RemoteReciprocalIssueLinkCreateResponse createReciprocalRemoteIssueLink(Issue sourceIssue, RemoteReciprocalIssueLinkCreateRequest request, javax.ws.rs.core.UriInfo contextUriInfo) throws Exception - Throws:
Exception
-
validateReciprocalRemoteIssueLinkRequest
public void validateReciprocalRemoteIssueLinkRequest(RemoteReciprocalIssueLinkCreateRequest request) -
extractIssueId
-
createBodyForRemoteIssueLink
protected String createBodyForRemoteIssueLink(RemoteIssueLinkCreateOrUpdateRequest target) throws JSONException - Throws:
JSONException
-
updateRemoteIssueLink
public javax.ws.rs.core.Response updateRemoteIssueLink(Issue issue, String idString, RemoteIssueLinkCreateOrUpdateRequest request) Updates a remote issue link.- Parameters:
issue- the issue to update the link withidString- the id of the remote issue linkrequest- the request, containing the values of the remote issue link to be updated- Returns:
- a Response with no content, or the error details if something went wrong
-
deleteRemoteIssueLinkById
Deletes a remote issue link.- Parameters:
issue- the issueidString- the id of the remote issue link- Returns:
- a Response with no content, or the error details if something went wrong
-
deleteRemoteIssueLinkByGlobalId
-