@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)
public RestPlan getClone(String fromProjectKey, String fromBuildKey, String toProjectKey, 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 © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.