Class BambooPlanConfigImportResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.configuration.external.BambooPlanConfigImportResource
@Path("/import/plan")
@Consumes("application/x-yaml")
@Produces("application/json")
@Singleton
public class BambooPlanConfigImportResource
extends Object
-
Constructor Summary
ConstructorDescriptionBambooPlanConfigImportResource
(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.sal.api.message.I18nResolver i18nResolver, BambooAuthenticationContext authenticationContext, PlanConfigImportService planConfigImportService, PlanPermissionService planPermissionService, RepositoryDefinitionManager repositoryDefinitionManager, YamlSpecsImportService yamlSpecsImportService, BambooPermissionManager bambooPermissionManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
importBranch
(@NotNull String yamlString, String branch, javax.ws.rs.core.HttpHeaders headers, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.Response
importPlan
(@NotNull String yamlString, javax.ws.rs.core.HttpHeaders headers, javax.ws.rs.core.UriInfo uriInfo) Import configuration of a top level plan in YAML format.javax.ws.rs.core.Response
importPlanPermission
(@NotNull String yaml, javax.ws.rs.core.HttpHeaders headers) Import configuration of plan permission in YAML format.javax.ws.rs.core.Response
validatePlan
(long repositoryId, @NotNull String yamlString) Validate the Yaml Specs represented as a pure string.
-
Constructor Details
-
BambooPlanConfigImportResource
@Inject public BambooPlanConfigImportResource(com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.sal.api.message.I18nResolver i18nResolver, BambooAuthenticationContext authenticationContext, PlanConfigImportService planConfigImportService, PlanPermissionService planPermissionService, RepositoryDefinitionManager repositoryDefinitionManager, YamlSpecsImportService yamlSpecsImportService, BambooPermissionManager bambooPermissionManager)
-
-
Method Details
-
importPlan
@POST public javax.ws.rs.core.Response importPlan(@NotNull @NotNull String yamlString, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException Import configuration of a top level plan in YAML format.A minimal valid input consists of plan name, plan key and project reference:
--- key: PLAN name: My Plan project: key: PROJ ...
- Throws:
WebValidationException
-
validatePlan
@POST @Path("validate/{repositoryId}") public javax.ws.rs.core.Response validatePlan(@PathParam("repositoryId") long repositoryId, @NotNull @NotNull String yamlString) throws WebValidationException Validate the Yaml Specs represented as a pure string. This endpoint does not persist any data and does not introduce any changes to the system.- Throws:
WebValidationException
-
importPlanPermission
@POST @Path("permission") public javax.ws.rs.core.Response importPlanPermission(@NotNull @NotNull String yaml, @Context javax.ws.rs.core.HttpHeaders headers) throws WebValidationException Import configuration of plan permission in YAML format.- Throws:
WebValidationException
-
importBranch
@POST @Path("branch/{branch:.*}") public javax.ws.rs.core.Response importBranch(@NotNull @NotNull String yamlString, @PathParam("branch") String branch, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException - Throws:
WebValidationException
-