com.atlassian.bamboo.plugins.rest.resource
Class CloneResource

java.lang.Object
  extended by com.atlassian.bamboo.plugins.rest.resource.CloneResource

@Singleton
public class CloneResource
extends java.lang.Object


Constructor Summary
CloneResource(ChainCreationService chainCreationService, BambooPermissionManager bambooPermissionManager, ProjectManager projectManager, PlanService planService)
           
 
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
 

Constructor Detail

CloneResource

public CloneResource(ChainCreationService chainCreationService,
                     BambooPermissionManager bambooPermissionManager,
                     ProjectManager projectManager,
                     PlanService planService)
Method Detail

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 cloned
toProjectKey, - toBuildKey - form a PlanKey of the newly cloned plan
uriInfo -
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.