|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmatesoft.svn.core.wc2.SvnOperation<V>
V
- type of returning value in run()
methodpublic class SvnOperation<V>
Base class for all Svn* operations. Encapsulates mostly used parameters, operation state, different methods used by implementations.
Those parameters includes:run
method, starts the operation execution
org.tmatesoft.svn.core.wc2
Constructor Summary | |
---|---|
protected |
SvnOperation(SvnOperationFactory factory)
|
Method Summary | |
---|---|
void |
addTarget(SvnTarget target)
Adds one target to the operation's targets. |
void |
cancel()
Cancels the operation. |
protected void |
ensureArgumentsAreValid()
|
protected void |
ensureEnoughTargets()
|
protected void |
ensureHomohenousTargets()
|
java.util.Collection<java.lang.String> |
getApplicableChangelists()
Gets changelists to operate only on members of. |
ISVNAuthenticationManager |
getAuthenticationManager()
Gets operation's authentication manager, provided by SvnOperationFactory.getAuthenticationManager() . |
ISVNCanceller |
getCanceller()
Gets the cancel handler of the operation, provided by SvnOperationFactory.getCanceller() . |
SVNDepth |
getDepth()
Gets the limit of the operation by depth. |
ISVNEventHandler |
getEventHandler()
Gets the event handler for the operation, provided by SvnOperationFactory.getEventHandler() . |
SvnTarget |
getFirstTarget()
Returns first target of the operation. |
protected int |
getMaximumTargetsCount()
|
protected int |
getMinimumTargetsCount()
|
protected java.io.File |
getOperationalWorkingCopy()
|
SvnOperationFactory |
getOperationFactory()
Gets the factory that created the operation. |
ISVNOptions |
getOptions()
Gets operation's options, provided by SvnOperationFactory.getOptions() . |
ISVNRepositoryPool |
getRepositoryPool()
Gets the operation's pool of repositories, provided by SvnOperationFactory.getRepositoryPool() . |
SVNRevision |
getRevision()
Gets revision to operate on. |
java.util.Collection<SvnTarget> |
getTargets()
Returns all targets of the operation. |
boolean |
hasFileTargets()
Analyzes the targets and returns whether or not operation has at least one file in targets. |
boolean |
hasLocalTargets()
Gets whether or not the operation has local targets. |
boolean |
hasRemoteTargets()
Gets whether or not the operation has remote targets. |
protected void |
initDefaults()
|
boolean |
isCancelled()
Gets whether or not the operation is cancelled. |
boolean |
isChangesWorkingCopy()
Gets whether the operation changes working copy |
boolean |
isSleepForTimestamp()
Gets whether or not the operation should sleep after if fails. |
boolean |
isUseParentWcFormat()
Gets whether or not to use parent working copy format. |
protected boolean |
needsHomohenousTargets()
|
V |
run()
Executes the operation. |
void |
setApplicalbeChangelists(java.util.Collection<java.lang.String> changelists)
Sets changelists to operate only on members of. |
void |
setDepth(SVNDepth depth)
Sets the limit of the operation by depth. |
void |
setRevision(SVNRevision revision)
Sets revision of the operation. |
void |
setSingleTarget(SvnTarget target)
Sets one target of the operation. |
void |
setSleepForTimestamp(boolean isSleepForTimestamp)
Sets whether or not the operation should sleep after if fails. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SvnOperation(SvnOperationFactory factory)
Method Detail |
---|
public ISVNEventHandler getEventHandler()
SvnOperationFactory.getEventHandler()
. This event handler will be
dispatched SVNEvent
objects to provide detailed information about
actions and progress state of version control operations performed by
run()
method of SVN*
operation classes.
getEventHandler
in interface ISvnOperationOptionsProvider
ISVNEventHandler
public ISVNOptions getOptions()
SvnOperationFactory.getOptions()
.
getOptions
in interface ISvnOperationOptionsProvider
protected void initDefaults()
public void setSingleTarget(SvnTarget target)
target
- target of the operationSvnTarget
public void addTarget(SvnTarget target)
target
- target of the operationSvnTarget
public java.util.Collection<SvnTarget> getTargets()
SvnTarget
public SvnTarget getFirstTarget()
SvnTarget
public void setDepth(SVNDepth depth)
depth
- depth of the operationpublic SVNDepth getDepth()
public void setRevision(SVNRevision revision)
SVNRevision.UNDEFINED
, the operation's revision will be SVNRevision.WORKING
if target(s) are local; it will be will be SVNRevision.HEAD
it targets are remote.
revision
- revision of the operationpublic SVNRevision getRevision()
setRevision(SVNRevision)
public void setApplicalbeChangelists(java.util.Collection<java.lang.String> changelists)
changelists
- changelists of the operationpublic java.util.Collection<java.lang.String> getApplicableChangelists()
public SvnOperationFactory getOperationFactory()
public boolean hasLocalTargets()
true
if the operation has local targets, otherwise false
public boolean hasRemoteTargets()
true
if the operation has remote targets, otherwise false
protected void ensureEnoughTargets() throws SVNException
SVNException
protected int getMinimumTargetsCount()
protected int getMaximumTargetsCount()
public void cancel()
isCancelled
state.
If canceler is set, ISVNCanceller.checkCancelled()
is called,
otherwise SVNCancelException
is raised at the point of checking isCancelled
state.
public boolean isCancelled()
true
if the operation is cancelled, otherwise false
public V run() throws SVNException
SVNException
protected void ensureArgumentsAreValid() throws SVNException
SVNException
protected boolean needsHomohenousTargets()
protected void ensureHomohenousTargets() throws SVNException
SVNException
public ISVNRepositoryPool getRepositoryPool()
SvnOperationFactory.getRepositoryPool()
.
getRepositoryPool
in interface ISvnOperationOptionsProvider
public ISVNAuthenticationManager getAuthenticationManager()
SvnOperationFactory.getAuthenticationManager()
.
getAuthenticationManager
in interface ISvnOperationOptionsProvider
public ISVNCanceller getCanceller()
SvnOperationFactory.getCanceller()
.
getCanceller
in interface ISvnOperationOptionsProvider
cancel()
public boolean isSleepForTimestamp()
true
if the operation should sleep, otherwise false
SvnUpdate
public void setSleepForTimestamp(boolean isSleepForTimestamp)
isSleepForTimestamp
- true
if the operation should sleep, otherwise false
SvnUpdate
public boolean hasFileTargets()
true
if operation has at least one file in targets, otherwise false
public boolean isUseParentWcFormat()
true
if parent working copy format should be used, otherwise false
public boolean isChangesWorkingCopy()
true
if the operation changes the working copy, otherwise false
protected java.io.File getOperationalWorkingCopy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |