Class PlanResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.build.PlanResource
@Path("plan")
@Consumes({"application/xml","application/json"})
@Produces({"application/xml","application/json"})
@Singleton
@Component
public class PlanResource
extends Object
Plan service is supposed to be used to retrieve full list of plans and plan details
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlanResource(BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, BranchCreationFacade branchCreationFacade, CachedPlanManager cachedPlanManager, PlanManager planManager, LabelManager labelManager, PlanRestService planRestService, VariableDefinitionManager variableDefinitionManager, JiraIssueManager jiraIssueManager, JiraApplinksService jiraApplinksService, com.atlassian.event.api.EventPublisher eventPublisher, ArtifactDefinitionManager artifactDefinitionManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TestsManager testsManager, TestQuarantineManager testQuarantineManager, VcsRepositoryManager vcsRepositoryManager, DeletionService deletionService, RssDetectionService rssDetectionService, ChainBranchManager chainBranchManager, BuildDefinitionManager buildDefinitionManager, SpecsConsumerFactory specsConsumerFactory, SpecsExporter specsExporter, RestAuthenticationContext restAuthenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlanLabel(String projectKey, String buildKey, RestPlanLabel label) javax.ws.rs.core.ResponseaddPlanVariable(String projectKey, String buildKey, RestVariable variable, javax.ws.rs.core.UriInfo uriInfo) createNewBranch(String projectKey, String buildKey, String branchName, String vcsBranchName, Boolean enabled, Boolean cleanupEnabled, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsedeletePlan(String projectKey, String buildKey) javax.ws.rs.core.ResponsedeletePlanVariable(String projectKey, String buildKey, String variableName) javax.ws.rs.core.ResponsedisablePlan(String projectKey, String buildKey) javax.ws.rs.core.ResponseeditPlanVariable(String projectKey, String buildKey, String variableName, RestVariable variable) javax.ws.rs.core.ResponseenablePlan(String projectKey, String buildKey) javax.ws.rs.core.ResponseenableSpecsForBranches(String projectKey, String buildKey) javax.ws.rs.core.ResponseexportPlanSpec(String projectKey, String buildKey, String packageNameOpt, @Nullable String formatParam) getAllPlanList(javax.ws.rs.core.UriInfo uriInfo) getIssueDetails(String projectKey, String buildKey, String issueKey, javax.ws.rs.core.UriInfo uriInfo) getPlanAlias(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo) getPlanArtifactDefinition(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsegetPlanBranch(String projectKey, String buildKey, String branchName, javax.ws.rs.core.UriInfo uriInfo) getPlanBranches(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo) getPlanLabels(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsegetPlanVariable(String projectKey, String buildKey, String variableName) javax.ws.rs.core.ResponsegetPlanVariables(String projectKey, String buildKey) getVcsBranches(String projectKey, String buildKey, @Nullable String searchTerm, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsemarkPlanFavourite(String projectKey, String buildKey) javax.ws.rs.core.ResponsequarantineTest(String projectKey, String buildKey, long testId) javax.ws.rs.core.ResponseremovePlanLabel(String projectKey, String buildKey, String labelName) javax.ws.rs.core.ResponseunleashTest(String projectKey, String buildKey, long testId) javax.ws.rs.core.ResponseunmarkPlanFavourite(String projectKey, String buildKey)
-
Field Details
-
PASSWORD_MASK
- See Also:
-
-
Constructor Details
-
PlanResource
@Inject public PlanResource(BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, BranchCreationFacade branchCreationFacade, CachedPlanManager cachedPlanManager, PlanManager planManager, LabelManager labelManager, PlanRestService planRestService, VariableDefinitionManager variableDefinitionManager, JiraIssueManager jiraIssueManager, JiraApplinksService jiraApplinksService, com.atlassian.event.api.EventPublisher eventPublisher, ArtifactDefinitionManager artifactDefinitionManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TestsManager testsManager, TestQuarantineManager testQuarantineManager, VcsRepositoryManager vcsRepositoryManager, DeletionService deletionService, RssDetectionService rssDetectionService, ChainBranchManager chainBranchManager, BuildDefinitionManager buildDefinitionManager, SpecsConsumerFactory specsConsumerFactory, SpecsExporter specsExporter, RestAuthenticationContext restAuthenticationContext)
-
-
Method Details
-
getAllPlanList
-
getPlan
-
getPlanAlias
-
getPlanBranches
@GET @Path("{projectKey : ([^-/]+)}-{buildKey}/branch") public RestBranches getPlanBranches(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo) -
createNewBranch
@PUT @Path("{projectKey : ([^-/]+)}-{buildKey}/branch/{branchName}") public RestPlanBranch createNewBranch(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @PathParam("branchName") String branchName, @QueryParam("vcsBranch") String vcsBranchName, @QueryParam("enabled") Boolean enabled, @QueryParam("cleanupEnabled") Boolean cleanupEnabled, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException - Throws:
WebValidationException
-
getPlanBranch
-
getPlanLabels
@GET @Path("{projectKey : ([^-/]+)}-{buildKey}/label") public RestPlanLabels getPlanLabels(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo) -
addPlanLabel
@POST @Path("{projectKey : ([^-/]+)}-{buildKey}/label") public void addPlanLabel(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, RestPlanLabel label) -
removePlanLabel
@DELETE @Path("{projectKey : ([^-/]+)}-{buildKey}/label/{labelName}") public javax.ws.rs.core.Response removePlanLabel(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @PathParam("labelName") String labelName) throws Exception - Throws:
Exception
-
getVcsBranches
@GET @Path("{projectKey : ([^-/]+)}-{buildKey}/vcsBranches") public RestVcsBranches getVcsBranches(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @Nullable @QueryParam("searchTerm") @Nullable String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) -
getIssueDetails
@GET @Path("{projectKey : ([^-/]+)}-{buildKey}/issue/{issueKey}") public RestJiraIssue getIssueDetails(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @PathParam("issueKey") String issueKey, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException - Throws:
WebValidationException
-
markPlanFavourite
-
unmarkPlanFavourite
-
enablePlan
-
disablePlan
-
deletePlan
-
getPlanVariables
-
getPlanVariable
-
addPlanVariable
@POST @Path("{projectKey : ([^-/]+)}-{buildKey}/variables") public javax.ws.rs.core.Response addPlanVariable(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, RestVariable variable, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException - Throws:
WebValidationException
-
editPlanVariable
@PUT @Path("{projectKey : ([^-/]+)}-{buildKey}/variables/{variableName}") public javax.ws.rs.core.Response editPlanVariable(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @PathParam("variableName") String variableName, RestVariable variable) throws WebValidationException - Throws:
WebValidationException
-
deletePlanVariable
-
getPlanArtifactDefinition
@GET @Path("{projectKey : ([^-/]+)}-{buildKey}/artifact") public RestArtifactDefinitions getPlanArtifactDefinition(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo) -
quarantineTest
@POST @Path("{projectKey : ([^-/]+)}-{buildKey}/test/{testId}/quarantine") public javax.ws.rs.core.Response quarantineTest(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @PathParam("testId") long testId) throws WebValidationException - Throws:
WebValidationException
-
unleashTest
@POST @Path("{projectKey : ([^-/]+)}-{buildKey}/test/{testId}/unleash") public javax.ws.rs.core.Response unleashTest(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @PathParam("testId") long testId) throws WebValidationException - Throws:
WebValidationException
-
enableSpecsForBranches
-
exportPlanSpec
@GET @Path("{projectKey : ([^-/]+)}-{buildKey}/specs") public javax.ws.rs.core.Response exportPlanSpec(@PathParam("projectKey") String projectKey, @PathParam("buildKey") String buildKey, @QueryParam("package") String packageNameOpt, @Nullable @QueryParam("format") @Nullable String formatParam) throws WebValidationException - Throws:
WebValidationException
-