com.atlassian.bamboo.plugins.rest.resource
Class CloneResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.resource.CloneResource
@Singleton
public class CloneResource
- extends java.lang.Object
Method Summary |
RestPlan |
getClone(java.lang.String fromProjectKey,
java.lang.String fromBuildKey,
java.lang.String toProjectKey,
java.lang.String toBuildKey,
javax.ws.rs.core.UriInfo uriInfo)
Method used to clone an existing Plan into a new one, possibly into different project. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CloneResource
public CloneResource(PlanManager planManager,
ChainCreationService chainCreationService,
BambooPermissionManager bambooPermissionManager,
ProjectManager projectManager,
PlanService planService)
getClone
public RestPlan getClone(java.lang.String fromProjectKey,
java.lang.String fromBuildKey,
java.lang.String toProjectKey,
java.lang.String toBuildKey,
@Context
javax.ws.rs.core.UriInfo uriInfo)
- Method used to clone an existing Plan into a new one, possibly into different project.
Usage: /rest/api/latest/clone/FROM-PLAN:TO-PLAN
- Parameters:
fromProjectKey,
- fromBuildKey - form a PlanKey of the source plan to be clonedtoProjectKey,
- toBuildKey - form a PlanKey of the newly cloned planuriInfo
-
- Returns:
- a newly created plan as a
RestPlan
, or throws InvalidRequestException
- Throws:
InvalidRequestException
- when:
there is no source plan
there is no project to which clone
there is already plan with destination key
permission denied
Copyright © 2012 Atlassian. All Rights Reserved.