public class CloneLocationTask extends SessionedTask<java.lang.Object>
Cloning a location (project or folder) works differently from cloning a resource. It effectively clones all artifacts under that location (including folders) to a different location. Moreover the following are also performed.
Constructor and Description |
---|
CloneLocationTask(Ref source, Ref target, boolean merge) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
_execute()
Subclasses implement this method
|
static void |
clone(ConfigService configService, Ref source, Ref target, boolean merge) |
static void |
clone(ConfigService configService, java.lang.String session, Ref source, Ref target, boolean merge) |
assertExists, assertLocation, assertNONResource, assertNotExists, assertNotLocationData, assertNotNull, assertNotNullElement, assertResource, assertSimple, call, doExecute, doExecute, doExecute, doExecute, expand, getConfigContext, getConfigMBean, getConfigService, getDescription, getSession, isLocation, isReadOnlyTransaction, requiresSystemTransaction
public CloneLocationTask(Ref source, Ref target, boolean merge)
source
- the reference to the project or folder to be cloned.target
- the new identity of the cloned project or folder. If sourceRef is a location (project or folder) the targetRef must be a location too. However the user can specify a folder in the sourceRef and a project as the targetRef, or vice versa. The former effectively promotes a folder to be a project, whereas the latter demotes a project to be a folder.merge
- if true and when cloning a lcoation, do not complain if the target location already exists.public static void clone(ConfigService configService, Ref source, Ref target, boolean merge) throws CreateException, ValidationException
CreateException
ValidationException
public static void clone(ConfigService configService, java.lang.String session, Ref source, Ref target, boolean merge) throws CreateException, ValidationException
CreateException
ValidationException
protected java.lang.Object _execute() throws java.lang.Exception
SessionedTask
_execute
in class SessionedTask<java.lang.Object>
java.lang.Exception