@Singleton public class ResultResource extends Object
Constructor and Description |
---|
ResultResource(ResultService resultService,
FeatureManager featureManager) |
Modifier and Type | Method and Description |
---|---|
void |
addBuildComment(String projectKey,
String buildKey,
String buildNumber,
RestComment comment,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
javax.ws.rs.core.UriInfo uriInfo)
Adds new comment to build result specified by projectKey-buildKey-buildNumber.
|
javax.ws.rs.core.Response |
addBuildLabel(String projectKey,
String buildKey,
String buildNumber,
RestBuildLabel label,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
javax.ws.rs.core.UriInfo uriInfo)
Adds new label to build result specified by projectKey-buildKey-buildNumber.
|
RestResults |
getBranchHistory(String projectKey,
String buildKey,
String branchName,
String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results for specified plan.
|
Result |
getBuild(String projectKey,
String buildKey,
String buildNumber,
String expandParam,
boolean favouriteParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide build result specified by projectKey-buildKey-buildNumber.
|
Result |
getBuildAlias(String projectKey,
String buildKey,
String buildNumber,
String expandParam,
boolean favouriteParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide build result specified by projectKey-buildKey-buildNumber.
|
RestComments |
getBuildComments(String projectKey,
String buildKey,
String buildNumber,
javax.ws.rs.core.UriInfo uriInfo)
Provide list of comments for build result specified by projectKey-buildKey-buildNumber.
|
RestResults |
getBuildHistory(String projectKey,
String buildKey,
String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results for specified plan.
|
RestBuildLabels |
getBuildLabels(String projectKey,
String buildKey,
String buildNumber,
javax.ws.rs.core.UriInfo uriInfo)
Provide list of labels for build result specified by projectKey-buildKey-buildNumber.
|
RestResults |
getBuildResultsForChangeset(String changesetId,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results related to changeset id passed as parameter.
|
RestResults |
getBuildResultsForCheckoutChangeset(String changesetId,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of build results related to changeset id passed as parameter.
|
RestResults |
getLatestBuildResults(String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of latest build results for top level plans visible for users.
|
RestResults |
getLatestBuildResultsForProject(String projectKey,
String expandParam,
boolean favouriteParam,
String labelParam,
String issueKeyParam,
boolean allStatesParam,
boolean continuableParam,
boolean buildStateParam,
int startIndexParam,
int maxResultsParam,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of latest build results for top level plans for specified project.
|
RestResultStatus |
getResultStatus(String projectKey,
String buildKey,
String buildNumber,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide runtime information for currently executing build result.
|
javax.ws.rs.core.Response |
removeBuildLabel(String projectKey,
String buildKey,
String buildNumber,
String labelName,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
javax.ws.rs.core.UriInfo uriInfo)
Removes label from build result specified by projectKey-buildKey-buildNumber.
|
public ResultResource(ResultService resultService, FeatureManager featureManager)
public RestResults getLatestBuildResults(String expandParam, boolean favouriteParam, String labelParam, String issueKeyParam, boolean allStatesParam, boolean continuableParam, boolean buildStateParam, int startIndexParam, int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
expandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- public RestResults getLatestBuildResultsForProject(String projectKey, String expandParam, boolean favouriteParam, String labelParam, String issueKeyParam, boolean allStatesParam, boolean continuableParam, boolean buildStateParam, int startIndexParam, int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project key to filter plan result listexpandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- RestResults
public RestResults getBuildResultsForChangeset(String changesetId, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
changesetId
- changeset id related to build resulturiInfo
- authenticationContext
- RestResults
related to specified changeset idpublic RestResults getBuildResultsForCheckoutChangeset(String changesetId, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
changesetId
- checkout changeset id related to build resulturiInfo
- authenticationContext
- RestResults
checked out with specified changeset idpublic RestResults getBuildHistory(String projectKey, String buildKey, String expandParam, boolean favouriteParam, String labelParam, String issueKeyParam, boolean allStatesParam, boolean continuableParam, boolean buildStateParam, int startIndexParam, int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)expandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- RestResults
public RestResults getBranchHistory(String projectKey, String buildKey, String branchName, String expandParam, boolean favouriteParam, String labelParam, String issueKeyParam, boolean allStatesParam, boolean continuableParam, boolean buildStateParam, int startIndexParam, int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)expandParam
- expands build result details on request. Possible values are: artifacts, comments, labels, jiraIssues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. All expand parameters should contain results.result prefix.favouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userlabelParam
- filter by comma separated list of labelsissueKeyParam
- filter by comma separated list of Jira issue key related to resultallStatesParam
- return all build results including Unknown statescontinuableParam
- filter only results that may be continued (stopped on Manual Stage)buildStateParam
- filter results by state, valid values are Unknown, Successful, FailedstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- authenticationContext
- RestResults
public Result getBuild(String projectKey, String buildKey, String buildNumber, String expandParam, boolean favouriteParam, int startIndexParam, int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberexpandParam
- expands build result details on request. Possible values are: changes, metadata, artifacts, comments, labels, jiraIssues, stages, logEntries. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. logEntries and testResults are available only for job resultsfavouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- uriInfoauthenticationContext
- authenticationContextResultDetails
public Result getBuildAlias(String projectKey, String buildKey, String buildNumber, String expandParam, boolean favouriteParam, int startIndexParam, int maxResultsParam, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberexpandParam
- expands build result details on request. Possible values are: changes, metadata, artifacts, comments, labels, jiraIssues, stages, logEntries. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result. logEntries and testResults are available only for job resultsfavouriteParam
- filters build results list to show only results for favourite plans. Works only for authenticated userstartIndexParam
- start index for results list (zero based)maxResultsParam
- maximum size for returned listuriInfo
- uriInfoauthenticationContext
- authenticationContextResultDetails
public RestComments getBuildComments(String projectKey, String buildKey, String buildNumber, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- projectKeybuildKey
- planKey (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberuriInfo
- RestComments
public void addBuildComment(String projectKey, String buildKey, String buildNumber, RestComment comment, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- build numbercomment
- new comment contentauthenticationContext
- uriInfo
- public RestBuildLabels getBuildLabels(String projectKey, String buildKey, String buildNumber, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberuriInfo
- RestBuildLabels
public javax.ws.rs.core.Response addBuildLabel(String projectKey, String buildKey, String buildNumber, RestBuildLabel label, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, @Context javax.ws.rs.core.UriInfo uriInfo)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberlabel
- label content to add to build resultauthenticationContext
- uriInfo
- public javax.ws.rs.core.Response removeBuildLabel(String projectKey, String buildKey, String buildNumber, String labelName, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- either the number of the specific build result or 'latest' for the highest build numberlabelName
- label name to remove from build resultException
public RestResultStatus getResultStatus(String projectKey, String buildKey, String buildNumber, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
projectKey
- project keybuildKey
- plan key (might be simply planKey or composite planKey-jobKey)buildNumber
- buildNumber (numeric value only, 'latest' keyword is not supported for this method)uriInfo
- authenticationContext
- RestResultStatus
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.