Class PlanResource
java.lang.Object
com.atlassian.bamboo.plugins.testutils.rest.resource.plan.PlanResource
@Path("plan")
@Consumes("application/json")
@Produces("application/json")
@Singleton
public class PlanResource
extends Object
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorDescriptionPlanResource
(ArtifactDefinitionManager artifactDefinitionManager, BambooUserManager bambooUserManager, CachedPlanManager cachedPlanManager, ChainCreationService chainCreationService, DeletionService deletionService, com.atlassian.event.api.EventPublisher eventPublisher, JobCreationService jobCreationService, JobService jobService, LabelManager labelManager, PlanManager planManager, ProjectManager projectManager, RepositoryDefinitionManager repositoryDefinitionManager, RepositoryTestService repositoryTestService, StageService stageService, TaskConfigurationService taskConfigurationService, TriggerConfigurationService triggerConfigurationService, TriggerTypeManager triggerTypeManager, UIConfigSupport uiConfigSupport, VariableConfigurationService variableConfigurationService, RestAuthenticationContext restAuthenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
createPlan
(RestPlan restPlan, RestAuthenticationContext restAuthenticationContext) Create plan.javax.ws.rs.core.Response
createPlanVariable
(String planKey, String variableKey, String variableValue) javax.ws.rs.core.Response
Mark all top level plans for deletion.javax.ws.rs.core.Response
deletePlansInProject
(String projectKey) Mark all top level plans belonging to a project for deletion.javax.ws.rs.core.Response
deletePlanVariable
(String planKey, String variableKey) javax.ws.rs.core.Response
doesPlanExistAsRecord
(String planKey) findPlanId
(String planKey) getPlanLabels
(String planKey) getPlanRepositories
(String planKey) getPlanVariables
(String planKey) getTriggers
(String planKey) javax.ws.rs.core.Response
Trigger background deletion and wait up to 30s for its completionsetPlanLabels
(String planKey, List<String> labels)
-
Constructor Details
-
PlanResource
@Inject public PlanResource(ArtifactDefinitionManager artifactDefinitionManager, BambooUserManager bambooUserManager, CachedPlanManager cachedPlanManager, ChainCreationService chainCreationService, DeletionService deletionService, com.atlassian.event.api.EventPublisher eventPublisher, JobCreationService jobCreationService, JobService jobService, LabelManager labelManager, PlanManager planManager, ProjectManager projectManager, RepositoryDefinitionManager repositoryDefinitionManager, RepositoryTestService repositoryTestService, StageService stageService, TaskConfigurationService taskConfigurationService, TriggerConfigurationService triggerConfigurationService, TriggerTypeManager triggerTypeManager, UIConfigSupport uiConfigSupport, VariableConfigurationService variableConfigurationService, RestAuthenticationContext restAuthenticationContext)
-
-
Method Details
-
doesPlanExistAsRecord
@HEAD @Path("record/{planKey}") public javax.ws.rs.core.Response doesPlanExistAsRecord(@PathParam("planKey") String planKey) -
deleteAllPlans
@DELETE public javax.ws.rs.core.Response deleteAllPlans()Mark all top level plans for deletion. -
deletePlansInProject
@DELETE @Path("project/{projectKey}") public javax.ws.rs.core.Response deletePlansInProject(@PathParam("projectKey") String projectKey) Mark all top level plans belonging to a project for deletion. -
runBackgroundDeletion
@POST @Path("backgroundDeletion") public javax.ws.rs.core.Response runBackgroundDeletion()Trigger background deletion and wait up to 30s for its completion -
createPlan
@POST public javax.ws.rs.core.Response createPlan(RestPlan restPlan, @Context RestAuthenticationContext restAuthenticationContext) Create plan. This method still has some limitations. -
getPlanVariables
@GET @Path("{planKey}/variables") public List<RestVariableDefinition> getPlanVariables(@PathParam("planKey") String planKey) throws WebValidationException - Throws:
WebValidationException
-
createPlanVariable
@POST @Path("{planKey}/variables/{variableKey}") public javax.ws.rs.core.Response createPlanVariable(@PathParam("planKey") String planKey, @PathParam("variableKey") String variableKey, String variableValue) throws WebValidationException - Throws:
WebValidationException
-
deletePlanVariable
@DELETE @Path("{planKey}/variables/{variableKey}") public javax.ws.rs.core.Response deletePlanVariable(@PathParam("planKey") String planKey, @PathParam("variableKey") String variableKey) throws WebValidationException - Throws:
WebValidationException
-
findPlanId
-
getPlanRepositories
@GET @Path("{planKey}/repositories") public List<RestRepository> getPlanRepositories(@PathParam("planKey") String planKey) throws WebValidationException - Throws:
WebValidationException
-
getPlanLabels
@GET @Path("{planKey}/labels") public List<String> getPlanLabels(@PathParam("planKey") String planKey) throws WebValidationException - Throws:
WebValidationException
-
setPlanLabels
@PUT @Path("{planKey}/labels") public List<String> setPlanLabels(@PathParam("planKey") String planKey, List<String> labels) throws WebValidationException - Throws:
WebValidationException
-
getTriggers
@GET @Path("{planKey}/triggers") public List<RestTrigger> getTriggers(@PathParam("planKey") String planKey) throws WebValidationException - Throws:
WebValidationException
-