org.tmatesoft.svn.core.wc2
Class SvnCopy

java.lang.Object
  extended by org.tmatesoft.svn.core.wc2.SvnOperation<java.lang.Void>
      extended by org.tmatesoft.svn.core.wc2.SvnCopy
All Implemented Interfaces:
ISvnOperationOptionsProvider

public class SvnCopy
extends SvnOperation<java.lang.Void>

Represents copy operation. Copies each source in sources to operation's target representing working copy path, or converts a disjoint working copy to a copied one, or does virtual copy (see below).

See Also:
SvnCopySource

Constructor Summary
protected SvnCopy(SvnOperationFactory factory)
           
 
Method Summary
 void addCopySource(SvnCopySource source)
          Adds copy source information to the operation
 java.util.Collection<SvnCopySource> getSources()
          Returns operation's all copy sources, object containing information about what to copy.
 boolean isChangesWorkingCopy()
          Gets whether the operation changes working copy
 boolean isDisjoint()
          Returns whether copy is disjoint working copy.
 boolean isFailWhenDstExists()
          Gets whether to fail if target already exists.
 boolean isIgnoreExternals()
          Returns whether to ignore externals definitions.
 boolean isMakeParents()
          Gets whether to make parent folders if don't exist.
 boolean isMove()
          Gets whether to do copy as move operation (delete, then add with history).
 boolean isVirtual()
          Returns whether copy is virtual copy.
 void setDisjoint(boolean disjoint)
          Sets whether copy is disjoint working copy.
 void setFailWhenDstExists(boolean isFailWhenDstExist)
          Sets whether to fail if target already exists.
 void setIgnoreExternals(boolean ignoreExternals)
          Sets whether to ignore externals definitions.
 void setMakeParents(boolean isMakeParents)
          Sets whether to make parent folders if don't exist.
 void setMove(boolean isMove)
          Sets whether to do copy as move operation (delete, then add with history).
 void setVirtual(boolean virtual)
          Sets whether copy is virtual copy.
 
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureArgumentsAreValid, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, initDefaults, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SvnCopy

protected SvnCopy(SvnOperationFactory factory)
Method Detail

getSources

public java.util.Collection<SvnCopySource> getSources()
Returns operation's all copy sources, object containing information about what to copy.

Returns:
the copy sources of the operation, unmodifiable

addCopySource

public void addCopySource(SvnCopySource source)
Adds copy source information to the operation

Parameters:
source - copy source information

isMove

public boolean isMove()
Gets whether to do copy as move operation (delete, then add with history).

Returns:
true if move operation should be done, otherwise false

setMove

public void setMove(boolean isMove)
Sets whether to do copy as move operation (delete, then add with history).

Parameters:
isMove - true if move operation should be done, otherwise false

isMakeParents

public boolean isMakeParents()
Gets whether to make parent folders if don't exist.

Returns:
true if non-existent parent directories should be created, otherwise false

setMakeParents

public void setMakeParents(boolean isMakeParents)
Sets whether to make parent folders if don't exist.

Parameters:
isMakeParents - true if non-existent parent directories should be created, otherwise false

isFailWhenDstExists

public boolean isFailWhenDstExists()
Gets whether to fail if target already exists.

Returns:
true if fail when target already exists, otherwise false
See Also:
SvnRemoteCopy

setFailWhenDstExists

public void setFailWhenDstExists(boolean isFailWhenDstExist)
Sets whether to fail if target already exists.

Parameters:
isFailWhenDstExist - true if fail when target already exists, otherwise false
See Also:
SvnRemoteCopy

isIgnoreExternals

public boolean isIgnoreExternals()
Returns whether to ignore externals definitions.

Returns:
true if externals definitions should be ignored, otherwise false

setIgnoreExternals

public void setIgnoreExternals(boolean ignoreExternals)
Sets whether to ignore externals definitions.

Parameters:
ignoreExternals - true if externals definitions should be ignored, otherwise false

isVirtual

public boolean isVirtual()
Returns whether copy is virtual copy.

Returns:
true if it is virtual copy, otherwise false

setVirtual

public void setVirtual(boolean virtual)
Sets whether copy is virtual copy.

Parameters:
virtual - true if it is virtual copy, otherwise false

isDisjoint

public boolean isDisjoint()
Returns whether copy is disjoint working copy.

Returns:
true if it is disjoint working copy, otherwise false

setDisjoint

public void setDisjoint(boolean disjoint)
Sets whether copy is disjoint working copy.

Parameters:
disjoint - true if it is disjoint working copy, otherwise false

isChangesWorkingCopy

public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy

Overrides:
isChangesWorkingCopy in class SvnOperation<java.lang.Void>
Returns:
true if the operation changes the working copy, otherwise false