com.atlassian.bamboo.jira.rest
Class JiraRestServiceImpl
java.lang.Object
com.atlassian.bamboo.jira.rest.JiraRestServiceImpl
- All Implemented Interfaces:
- JiraRestService
public class JiraRestServiceImpl
- extends java.lang.Object
- implements JiraRestService
Method Summary |
JiraRestResponse |
doRestCallViaApplink(com.atlassian.applinks.api.ApplicationLink applicationLink,
java.lang.String requestUrl,
com.atlassian.sal.api.net.Request.MethodType methodType,
com.opensymphony.webwork.dispatcher.json.JSONObject data)
Preform a rest call to JIRA. |
com.opensymphony.webwork.dispatcher.json.JSONObject |
getRemoteIssueLinkJson(java.lang.String globalId,
java.lang.String text,
java.lang.String key,
java.lang.String relationship,
java.lang.String relativeUrl,
java.lang.String iconLocation)
Generate the JsonData representing an Issue link. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JiraRestServiceImpl
public JiraRestServiceImpl(com.opensymphony.xwork.TextProvider textProvider,
AdministrationConfigurationManager administrationConfigurationManager,
BambooHostApplication bambooHostApplication)
doRestCallViaApplink
@NotNull
public JiraRestResponse doRestCallViaApplink(@NotNull
com.atlassian.applinks.api.ApplicationLink applicationLink,
@NotNull
java.lang.String requestUrl,
@NotNull
com.atlassian.sal.api.net.Request.MethodType methodType,
@Nullable
com.opensymphony.webwork.dispatcher.json.JSONObject data)
throws CredentialsRequiredContextException
- Description copied from interface:
JiraRestService
- Preform a rest call to JIRA.
Will use application/json content type.
Will Perform extra validation for whether jira server is < 5.0 IFF the request 404s
- Specified by:
doRestCallViaApplink
in interface JiraRestService
- Parameters:
applicationLink
- for the JIRA instance you are going to callrequestUrl
- url to hit, relative to the JIRA server defined in the app link.methodType
- http method typedata
- optional data to be included in the request
- Returns:
JiraRestResponse
containing errors and response as JSON if possible.
- Throws:
CredentialsRequiredContextException
- if oauth dance required
getRemoteIssueLinkJson
@NotNull
public com.opensymphony.webwork.dispatcher.json.JSONObject getRemoteIssueLinkJson(@NotNull
java.lang.String globalId,
@NotNull
java.lang.String text,
@NotNull
java.lang.String key,
@NotNull
java.lang.String relationship,
@NotNull
java.lang.String relativeUrl,
java.lang.String iconLocation)
throws com.opensymphony.webwork.dispatcher.json.JSONException
- Description copied from interface:
JiraRestService
- Generate the JsonData representing an Issue link. Can be used in rest request to create issue link.
- Specified by:
getRemoteIssueLinkJson
in interface JiraRestService
- Parameters:
globalId
- text to uniquely identify this Remote Issue Link to prevent the same link being added multiple times to one issue. Will get refixed with appId.text
- this is the text that will display in the issue link (after we do our permissioning magic on the jira side)key
- this is technically the summary, but is also the key that the jira side will use to grab latest status e.g. planResultKey or planKey. Will also get displayed whilst trying to verify permissions.relationship
- this is the text that displays before the Issue Link, defining the relationship between the issue and what its linked to.relativeUrl
- this is the url in Bamboo you want the remote link to link to.iconLocation
- this is the full path to the icon to be displayed next to the link. Most probably this will be a link to the icon on the JIRA Server.
- Returns:
- JsonObject representing the Remote Issue Link.
- Throws:
com.opensymphony.webwork.dispatcher.json.JSONException
Copyright © 2012 Atlassian. All Rights Reserved.