com.atlassian.bamboo.plugins.rest.service
Class ResultServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.plugins.rest.service.ResultServiceImpl
All Implemented Interfaces:
ResultService

public class ResultServiceImpl
extends java.lang.Object
implements ResultService

Service used to retrieve build results


Constructor Summary
ResultServiceImpl(BambooUserManager bambooUserManager, ResultsSummaryManager resultsSummaryManager, AdministrationConfigurationManager administrationConfigurationManager, LabelManager labelManager, CommentManager commentManager, com.atlassian.event.EventManager eventManager, ProjectManager projectManager, BuildExecutionManager buildExecutionManager, BuildQueueManager buildQueueManager, PlanManager planManager, PlanExecutionManager planExecutionManager, StageStatusHelper stageStatusHelper, PlanExecutableAgentsHelper planExecutableAgentsHelper, BuildLogFileAccessorFactory buildLogFileAccessorFactory)
           
 
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, javax.ws.rs.core.UriInfo uriInfo)
           
 void addBuildLabel(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, RestBuildLabel label, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, javax.ws.rs.core.UriInfo uriInfo)
           
protected  void addBuildSearchCriteria(Plan plan, javax.ws.rs.core.UriInfo uriInfo, ResultsSummaryCriteriaBuilder criteriaBuilder)
           
 RestComments getBuildComments(java.lang.String projectKey, java.lang.String buildKey, java.lang.String buildNumber, javax.ws.rs.core.UriInfo uriInfo)
           
 RestResults getBuildHistoryList(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)
           
 Result getBuildResult(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)
           
protected  ResultsSummary getBuildResultSummary(PlanKey planKey, 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)
           
 RestResultStatus getResultStatus(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)
           
protected  RestResults prepareBuildHistoryResponse(java.util.List<? extends ResultsSummary> buildResultsSummaries, javax.ws.rs.core.UriInfo uriInfo)
           
 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, javax.ws.rs.core.UriInfo uriInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultServiceImpl

public ResultServiceImpl(BambooUserManager bambooUserManager,
                         ResultsSummaryManager resultsSummaryManager,
                         AdministrationConfigurationManager administrationConfigurationManager,
                         LabelManager labelManager,
                         CommentManager commentManager,
                         com.atlassian.event.EventManager eventManager,
                         ProjectManager projectManager,
                         BuildExecutionManager buildExecutionManager,
                         BuildQueueManager buildQueueManager,
                         PlanManager planManager,
                         PlanExecutionManager planExecutionManager,
                         StageStatusHelper stageStatusHelper,
                         PlanExecutableAgentsHelper planExecutableAgentsHelper,
                         BuildLogFileAccessorFactory buildLogFileAccessorFactory)
Method Detail

getLatestBuildResults

public RestResults getLatestBuildResults(javax.ws.rs.core.UriInfo uriInfo,
                                         com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Specified by:
getLatestBuildResults in interface ResultService

getLatestBuildResultsForProject

public RestResults getLatestBuildResultsForProject(java.lang.String projectKey,
                                                   javax.ws.rs.core.UriInfo uriInfo,
                                                   com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Specified by:
getLatestBuildResultsForProject in interface ResultService

getBuildComments

public RestComments getBuildComments(java.lang.String projectKey,
                                     java.lang.String buildKey,
                                     java.lang.String buildNumber,
                                     javax.ws.rs.core.UriInfo uriInfo)
Specified by:
getBuildComments in interface ResultService

addBuildComment

public void addBuildComment(java.lang.String projectKey,
                            java.lang.String buildKey,
                            java.lang.String buildNumber,
                            RestComment comment,
                            com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
                            javax.ws.rs.core.UriInfo uriInfo)
Specified by:
addBuildComment in interface ResultService

getBuildLabels

public RestBuildLabels getBuildLabels(java.lang.String projectKey,
                                      java.lang.String buildKey,
                                      java.lang.String buildNumber,
                                      javax.ws.rs.core.UriInfo uriInfo)
Specified by:
getBuildLabels in interface ResultService

addBuildLabel

public void addBuildLabel(java.lang.String projectKey,
                          java.lang.String buildKey,
                          java.lang.String buildNumber,
                          RestBuildLabel label,
                          com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext,
                          javax.ws.rs.core.UriInfo uriInfo)
Specified by:
addBuildLabel in interface ResultService

removeBuildLabel

public 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,
                             javax.ws.rs.core.UriInfo uriInfo)
                      throws java.lang.Exception
Specified by:
removeBuildLabel in interface ResultService
Throws:
java.lang.Exception

addBuildSearchCriteria

protected void addBuildSearchCriteria(Plan plan,
                                      javax.ws.rs.core.UriInfo uriInfo,
                                      ResultsSummaryCriteriaBuilder criteriaBuilder)

getBuildHistoryList

public RestResults getBuildHistoryList(java.lang.String projectKey,
                                       java.lang.String buildKey,
                                       javax.ws.rs.core.UriInfo uriInfo,
                                       com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Specified by:
getBuildHistoryList in interface ResultService

prepareBuildHistoryResponse

protected RestResults prepareBuildHistoryResponse(java.util.List<? extends ResultsSummary> buildResultsSummaries,
                                                  javax.ws.rs.core.UriInfo uriInfo)

getBuildResult

public Result getBuildResult(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)
Specified by:
getBuildResult in interface ResultService
Parameters:
projectKey - project key
buildKey - build's part of plan key
buildNumber - buildNumber (numeric value or 'latest')
uriInfo - uriInfo
authenticationContext - authenticationContext
Returns:
the Result object

getResultStatus

public RestResultStatus getResultStatus(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)
Specified by:
getResultStatus in interface ResultService

getBuildResultSummary

protected ResultsSummary getBuildResultSummary(PlanKey planKey,
                                               java.lang.String buildNumber,
                                               javax.ws.rs.core.UriInfo uriInfo)


Copyright © 2011 Atlassian. All Rights Reserved.