Class ResultServiceImpl
java.lang.Object
com.atlassian.bamboo.plugins.rest.service.ResultServiceImpl
- All Implemented Interfaces:
ResultService
Service used to retrieve build results
-
Constructor Summary
ConstructorsConstructorDescriptionResultServiceImpl(AdministrationConfigurationAccessor administrationConfigurationAccessor, ArtifactLinkManager artifactLinkManager, BambooUserManager bambooUserManager, BuildLogFileAccessorFactory buildLogFileAccessorFactory, BuildLoggerManager buildLoggerManager, BuildQueueManager buildQueueManager, CommentService commentService, ExecutableAgentsHelper executableAgentsHelper, com.atlassian.sal.api.message.I18nResolver i18nResolver, LabelManager labelManager, PlanExecutionManager planExecutionManager, PlanRestService planRestService, ProjectsRestService projectsRestService, ResultsSummaryManager resultsSummaryManager, StageStatusHelper stageStatusHelper, RestAuthenticationContext restAuthenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBuildComment(String projectKey, String buildKey, String buildNumber, CreateCommentRequest comment, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) voidaddBuildLabel(String projectKey, String buildKey, String buildNumber, RestBuildLabel label, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) protected voidaddBuildSearchCriteria(ImmutablePlan plan, javax.ws.rs.core.UriInfo uriInfo, ResultsSummaryCriteriaBuilder criteriaBuilder) getBranchHistoryList(String projectKey, String buildKey, String branchName, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Does not return Specs-related resultsgetBuildComments(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo) getBuildHistoryList(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Does not return Specs-related resultsgetBuildLabels(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo) getBuildResult(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Get the build result for the given parameters.getBuildResultsForChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) getBuildResultsForCheckoutChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) getLatestBuildResults(javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Does not return Specs-related resultsgetLatestBuildResultsForProject(String projectKey, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Does not return Specs-related resultsgetResultStatus(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) protected RestResultsprepareBuildHistoryResponse(List<? extends ResultsSummary> buildResultsSummaries, int size, org.apache.commons.lang3.Range<Integer> range, javax.ws.rs.core.UriInfo uriInfo) protected RestResultsprepareBuildHistoryResponse(List<? extends ResultsSummary> buildResultsSummaries, javax.ws.rs.core.UriInfo uriInfo) voidremoveBuildComment(String projectKey, String buildKey, String buildNumber, long commentId, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) voidremoveBuildLabel(String projectKey, String buildKey, String buildNumber, String labelName, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo)
-
Constructor Details
-
ResultServiceImpl
@Inject public ResultServiceImpl(AdministrationConfigurationAccessor administrationConfigurationAccessor, ArtifactLinkManager artifactLinkManager, BambooUserManager bambooUserManager, BuildLogFileAccessorFactory buildLogFileAccessorFactory, BuildLoggerManager buildLoggerManager, BuildQueueManager buildQueueManager, CommentService commentService, ExecutableAgentsHelper executableAgentsHelper, com.atlassian.sal.api.message.I18nResolver i18nResolver, LabelManager labelManager, PlanExecutionManager planExecutionManager, PlanRestService planRestService, ProjectsRestService projectsRestService, ResultsSummaryManager resultsSummaryManager, StageStatusHelper stageStatusHelper, RestAuthenticationContext restAuthenticationContext)
-
-
Method Details
-
getLatestBuildResults
public RestResults getLatestBuildResults(javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Description copied from interface:ResultServiceDoes not return Specs-related results- Specified by:
getLatestBuildResultsin interfaceResultService
-
getLatestBuildResultsForProject
public RestResults getLatestBuildResultsForProject(String projectKey, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Description copied from interface:ResultServiceDoes not return Specs-related results- Specified by:
getLatestBuildResultsForProjectin interfaceResultService
-
getBuildResultsForChangeSetId
public RestResults getBuildResultsForChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) - Specified by:
getBuildResultsForChangeSetIdin interfaceResultService
-
getBuildResultsForCheckoutChangeSetId
public RestResults getBuildResultsForCheckoutChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) - Specified by:
getBuildResultsForCheckoutChangeSetIdin interfaceResultService
-
getBuildComments
public RestComments getBuildComments(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
getBuildCommentsin interfaceResultService
-
addBuildComment
public void addBuildComment(String projectKey, String buildKey, String buildNumber, CreateCommentRequest comment, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
addBuildCommentin interfaceResultService
-
removeBuildComment
public void removeBuildComment(String projectKey, String buildKey, String buildNumber, long commentId, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
removeBuildCommentin interfaceResultService
-
getBuildLabels
public RestBuildLabels getBuildLabels(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
getBuildLabelsin interfaceResultService
-
addBuildLabel
public void addBuildLabel(String projectKey, String buildKey, String buildNumber, RestBuildLabel label, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
addBuildLabelin interfaceResultService
-
removeBuildLabel
public void removeBuildLabel(String projectKey, String buildKey, String buildNumber, String labelName, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) throws Exception - Specified by:
removeBuildLabelin interfaceResultService- Throws:
Exception
-
addBuildSearchCriteria
protected void addBuildSearchCriteria(ImmutablePlan plan, javax.ws.rs.core.UriInfo uriInfo, ResultsSummaryCriteriaBuilder criteriaBuilder) -
getBuildHistoryList
public RestResults getBuildHistoryList(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Description copied from interface:ResultServiceDoes not return Specs-related results- Specified by:
getBuildHistoryListin interfaceResultService
-
getBranchHistoryList
public RestResults getBranchHistoryList(String projectKey, String buildKey, String branchName, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Description copied from interface:ResultServiceDoes not return Specs-related results- Specified by:
getBranchHistoryListin interfaceResultService
-
prepareBuildHistoryResponse
protected RestResults prepareBuildHistoryResponse(List<? extends ResultsSummary> buildResultsSummaries, javax.ws.rs.core.UriInfo uriInfo) -
prepareBuildHistoryResponse
protected RestResults prepareBuildHistoryResponse(List<? extends ResultsSummary> buildResultsSummaries, int size, org.apache.commons.lang3.Range<Integer> range, javax.ws.rs.core.UriInfo uriInfo) -
getBuildResult
public Result getBuildResult(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Description copied from interface:ResultServiceGet the build result for the given parameters.- Specified by:
getBuildResultin interfaceResultService- Parameters:
projectKey- project keybuildKey- build's part of plan keybuildNumber- buildNumber (numeric value or 'latest' for the highest build number)uriInfo- uriInforestAuthenticationContext- authenticationContext- Returns:
- the
Resultobject
-
getResultStatus
public RestResultStatus getResultStatus(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) - Specified by:
getResultStatusin interfaceResultService
-