@Path(value="clone") @Consumes(value={"application/xml","application/json"}) @Produces(value={"application/xml","application/json"}) @Singleton public class CloneResource extends Object
Modifier and Type | Field and Description |
---|---|
static RestJob |
CLONE_JOB_EXAMPLE |
Constructor and Description |
---|
CloneResource(ChainCreationService chainCreationService,
BambooPermissionManager bambooPermissionManager,
ProjectManager projectManager,
PlanRestService planRestService) |
Modifier and Type | Method and Description |
---|---|
RestPlan |
getClone(String fromProjectKey,
String fromBuildKey,
String toProjectKey,
String toBuildKey,
javax.ws.rs.core.UriInfo uriInfo)
Method used to clone an existing Plan into a new one, possibly into different project.
|
public static final RestJob CLONE_JOB_EXAMPLE
public CloneResource(ChainCreationService chainCreationService, BambooPermissionManager bambooPermissionManager, ProjectManager projectManager, PlanRestService planRestService)
@PUT @Path(value="{projectKey}-{buildKey}:{toProjectKey}-{toBuildKey}") public RestPlan getClone(@PathParam(value="projectKey") String fromProjectKey, @PathParam(value="buildKey") String fromBuildKey, @PathParam(value="toProjectKey") String toProjectKey, @PathParam(value="toBuildKey") String toBuildKey, @Context javax.ws.rs.core.UriInfo uriInfo)
fromProjectKey,
- fromBuildKey - form a PlanKey of the source plan to be clonedtoProjectKey,
- toBuildKey - form a PlanKey of the newly cloned planuriInfo
- RestPlan
, or throws InvalidRequestExceptionInvalidRequestException
- when:
there is no source plan
there is no project to which clone
there is already plan with destination key
permission deniedCopyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.