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

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

@Singleton
public class BuildResource
extends java.lang.Object

Service used to retrieve build results


Constructor Summary
BuildResource(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)
           
 AbstractRestBuild getBuildAlias2(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)
           
 RestBuilds 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

 RestBuilds getBuildHistoryAlias(java.lang.String projectKey, java.lang.String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 RestBuildLabels getBuildLabels(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, javax.ws.rs.core.UriInfo uriInfo)
           
 RestBuilds getLatestBuildResults(javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 RestBuilds 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

BuildResource

public BuildResource(ResultService resultService)
Method Detail

getLatestBuildResults

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

getLatestBuildResultsForProject

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

getBuildHistory

public RestBuilds 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:
buildKey - build's part of plan key
uriInfo - uriInfo
authenticationContext - authenticationContext
Returns:
the RestBuilds object

getBuildHistoryAlias

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

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)

getBuildAlias2

public AbstractRestBuild getBuildAlias2(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.