com.atlassian.bamboo.plugins.rest.resource
Class ResultResource

java.lang.Object
  extended by com.atlassian.bamboo.plugins.rest.resource.ResultResource

@Singleton
public class ResultResource
extends java.lang.Object

Service used to retrieve build results


Constructor Summary
ResultResource(ResultService resultService)
           
 
Method Summary
 void addBuildComment(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, RestComment comment, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 void addBuildLabel(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, RestBuildLabel label, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 AbstractRestBuild getBuild(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
          Used to retrieve build result for specified build number (or latest build) Should be invoked as /rest/api/latest/build/PROJECTKEY-BUILDKEY-BUILDNUMBER or /rest/api/latest/build/PROJECTKEY-BUILDKEY/latest

Possible expand parameters: artifacts - list of url for artifacts produced by build (at least build log url)

 AbstractRestBuild getBuildAlias(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 RestComments getBuildComments(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, javax.ws.rs.core.UriInfo uriInfo)
           
 RestResults getBuildHistory(java.lang.String projectKey, java.lang.String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
          Used to retrieve list of build results Should be invoked as /rest/api/latest/build/PROJECTKEY-BUILDKEY

Possible expand parameters: plan - detailed plan information builds - list of build results builds.build - list of build result with build result details builds.build.artifacts - list of build result with build result details and artifacts list for build result

 RestBuildLabels getBuildLabels(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, javax.ws.rs.core.UriInfo uriInfo)
           
 RestResults getLatestBuildResults(javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 RestResults getLatestBuildResultsForProject(java.lang.String projectKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 void removeBuildLabel(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, java.lang.String labelName, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultResource

public ResultResource(ResultService resultService)
Method Detail

getLatestBuildResults

public RestResults getLatestBuildResults(@Context
                                         javax.ws.rs.core.UriInfo uriInfo,
                                         @Context
                                         com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)

getLatestBuildResultsForProject

public RestResults getLatestBuildResultsForProject(java.lang.String projectKey,
                                                   @Context
                                                   javax.ws.rs.core.UriInfo uriInfo,
                                                   @Context
                                                   com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)

getBuildHistory

public RestResults getBuildHistory(java.lang.String projectKey,
                                   java.lang.String buildKey,
                                   @Context
                                   javax.ws.rs.core.UriInfo uriInfo,
                                   @Context
                                   com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Used to retrieve list of build results Should be invoked as /rest/api/latest/build/PROJECTKEY-BUILDKEY

Possible expand parameters: plan - detailed plan information builds - list of build results builds.build - list of build result with build result details builds.build.artifacts - list of build result with build result details and artifacts list for build result

Parameters:
projectKey - project key
buildKey - build's part of plan key
uriInfo - uriInfo
authenticationContext - authenticationContext
Returns:
the RestBuilds object

getBuild

public AbstractRestBuild getBuild(java.lang.String projectKey,
                                  java.lang.String buildKey,
                                  java.lang.String buildNumber,
                                  @Context
                                  javax.ws.rs.core.UriInfo uriInfo,
                                  @Context
                                  com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Used to retrieve build result for specified build number (or latest build) Should be invoked as /rest/api/latest/build/PROJECTKEY-BUILDKEY-BUILDNUMBER or /rest/api/latest/build/PROJECTKEY-BUILDKEY/latest

Possible expand parameters: artifacts - list of url for artifacts produced by build (at least build log url)

Parameters:
projectKey - project key
buildKey - build's part of plan key
buildNumber - buildNumber (numeric value or 'latest')
uriInfo - uriInfo
authenticationContext - authenticationContext
Returns:
the BaseBuildDetails object

getBuildAlias

public AbstractRestBuild getBuildAlias(java.lang.String projectKey,
                                       java.lang.String buildKey,
                                       java.lang.String buildNumber,
                                       @Context
                                       javax.ws.rs.core.UriInfo uriInfo,
                                       @Context
                                       com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)

getBuildComments

public RestComments getBuildComments(java.lang.String projectKey,
                                     java.lang.String buildKey,
                                     java.lang.String buildNumber,
                                     @Context
                                     javax.ws.rs.core.UriInfo uriInfo)

addBuildComment

public void addBuildComment(java.lang.String projectKey,
                            java.lang.String buildKey,
                            java.lang.String buildNumber,
                            RestComment comment,
                            @Context
                            com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)

getBuildLabels

public RestBuildLabels getBuildLabels(java.lang.String projectKey,
                                      java.lang.String buildKey,
                                      java.lang.String buildNumber,
                                      @Context
                                      javax.ws.rs.core.UriInfo uriInfo)

addBuildLabel

public void addBuildLabel(java.lang.String projectKey,
                          java.lang.String buildKey,
                          java.lang.String buildNumber,
                          RestBuildLabel label,
                          @Context
                          com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)

removeBuildLabel

public void removeBuildLabel(java.lang.String projectKey,
                             java.lang.String buildKey,
                             java.lang.String buildNumber,
                             java.lang.String labelName,
                             @Context
                             com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
                      throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2010 Atlassian. All Rights Reserved.