Class ResultServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.plugins.rest.service.ResultServiceImpl
-
- All Implemented Interfaces:
ResultService
@Component public class ResultServiceImpl extends Object implements ResultService
Service used to retrieve build results
-
-
Constructor Summary
Constructors Constructor Description 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBuildComment(String projectKey, String buildKey, String buildNumber, CreateCommentRequest comment, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, javax.ws.rs.core.UriInfo uriInfo)
void
addBuildLabel(String projectKey, String buildKey, String buildNumber, RestBuildLabel label, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, javax.ws.rs.core.UriInfo uriInfo)
protected void
addBuildSearchCriteria(ImmutablePlan plan, javax.ws.rs.core.UriInfo uriInfo, ResultsSummaryCriteriaBuilder criteriaBuilder)
RestResults
getBranchHistoryList(String projectKey, String buildKey, String branchName, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Does not return Specs-related resultsRestComments
getBuildComments(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo)
RestResults
getBuildHistoryList(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Does not return Specs-related resultsRestBuildLabels
getBuildLabels(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo)
Result
getBuildResult(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Get the build result for the given parameters.RestResults
getBuildResultsForChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
RestResults
getBuildResultsForCheckoutChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
RestResults
getLatestBuildResults(javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Does not return Specs-related resultsRestResults
getLatestBuildResultsForProject(String projectKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Does not return Specs-related resultsRestResultStatus
getResultStatus(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, javax.ws.rs.core.UriInfo uriInfo)
void
removeBuildLabel(String projectKey, String buildKey, String buildNumber, String labelName, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, javax.ws.rs.core.UriInfo uriInfo)
-
-
-
Constructor Detail
-
ResultServiceImpl
@Autowired 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)
-
-
Method Detail
-
getLatestBuildResults
public RestResults getLatestBuildResults(javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
- Specified by:
getBuildResultsForChangeSetId
in interfaceResultService
-
getBuildResultsForCheckoutChangeSetId
public RestResults getBuildResultsForCheckoutChangeSetId(String changeSetId, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
- 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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
addBuildComment
in interfaceResultService
-
removeBuildComment
public void removeBuildComment(String projectKey, String buildKey, String buildNumber, long commentId, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, 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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, javax.ws.rs.core.UriInfo uriInfo)
- Specified by:
addBuildLabel
in interfaceResultService
-
removeBuildLabel
public void removeBuildLabel(String projectKey, String buildKey, String buildNumber, String labelName, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext, 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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
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, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
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
- uriInfoauthenticationContext
- authenticationContext- Returns:
- the
Result
object
-
getResultStatus
public RestResultStatus getResultStatus(String projectKey, String buildKey, String buildNumber, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
- Specified by:
getResultStatus
in interfaceResultService
-
-