Class ResultServiceImpl
java.lang.Object
com.atlassian.bamboo.plugins.rest.service.ResultServiceImpl
- All Implemented Interfaces:
ResultService
Service used to retrieve build results
-
Constructor Summary
ConstructorDescriptionResultServiceImpl
(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 TypeMethodDescriptionvoid
addBuildComment
(String projectKey, String buildKey, String buildNumber, CreateCommentRequest comment, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) void
addBuildLabel
(String projectKey, String buildKey, String buildNumber, RestBuildLabel label, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) protected void
addBuildSearchCriteria
(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 RestResults
prepareBuildHistoryResponse
(List<? extends ResultsSummary> buildResultsSummaries, int size, org.apache.commons.lang3.Range<Integer> range, javax.ws.rs.core.UriInfo uriInfo) protected RestResults
prepareBuildHistoryResponse
(List<? extends ResultsSummary> buildResultsSummaries, javax.ws.rs.core.UriInfo uriInfo) void
removeBuildComment
(String projectKey, String buildKey, String buildNumber, long commentId, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) void
removeBuildLabel
(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:ResultService
Does not return Specs-related results- Specified by:
getLatestBuildResults
in interfaceResultService
-
getLatestBuildResultsForProject
public RestResults getLatestBuildResultsForProject(String projectKey, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Description copied from interface:ResultService
Does not return Specs-related results- Specified by:
getLatestBuildResultsForProject
in interfaceResultService
-
getBuildResultsForChangeSetId
public RestResults getBuildResultsForChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) - Specified by:
getBuildResultsForChangeSetId
in interfaceResultService
-
getBuildResultsForCheckoutChangeSetId
public RestResults getBuildResultsForCheckoutChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) - Specified by:
getBuildResultsForCheckoutChangeSetId
in interfaceResultService
-
getBuildComments
public RestComments getBuildComments(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
getBuildComments
in interfaceResultService
-
addBuildComment
public void addBuildComment(String projectKey, String buildKey, String buildNumber, CreateCommentRequest comment, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
addBuildComment
in interfaceResultService
-
removeBuildComment
public void removeBuildComment(String projectKey, String buildKey, String buildNumber, long commentId, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
removeBuildComment
in interfaceResultService
-
getBuildLabels
public RestBuildLabels getBuildLabels(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
getBuildLabels
in interfaceResultService
-
addBuildLabel
public void addBuildLabel(String projectKey, String buildKey, String buildNumber, RestBuildLabel label, RestAuthenticationContext restAuthenticationContext, javax.ws.rs.core.UriInfo uriInfo) - Specified by:
addBuildLabel
in 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:
removeBuildLabel
in 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:ResultService
Does not return Specs-related results- Specified by:
getBuildHistoryList
in interfaceResultService
-
getBranchHistoryList
public RestResults getBranchHistoryList(String projectKey, String buildKey, String branchName, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) Description copied from interface:ResultService
Does not return Specs-related results- Specified by:
getBranchHistoryList
in 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:ResultService
Get the build result for the given parameters.- Specified by:
getBuildResult
in 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
Result
object
-
getResultStatus
public RestResultStatus getResultStatus(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, RestAuthenticationContext restAuthenticationContext) - Specified by:
getResultStatus
in interfaceResultService
-