public abstract class SvnOperationRunner<V,T extends SvnOperation<V>> extends java.lang.Object implements ISvnOperationRunner<V,T>, ISVNEventHandler
UNKNOWN
NULL
Constructor and Description |
---|
SvnOperationRunner() |
Modifier and Type | Method and Description |
---|---|
void |
checkCancelled()
Checks if the current operation is cancelled (somehow interrupted)
and should throw an SVNCancelException or notify the handler if exists.
|
protected T |
getOperation() |
protected SVNWCContext |
getWcContext() |
protected void |
handleEvent(SVNEvent event) |
void |
handleEvent(SVNEvent event,
double progress)
Handles the current event.
|
void |
reset(SvnWcGeneration wcGeneration)
Resets runner's working copy generation.
|
protected abstract V |
run() |
V |
run(T operation)
Implementation of operation's
run method for concrete working copy generation |
void |
setOperation(T operation) |
void |
setWcContext(SVNWCContext context)
Sets operation's context
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWcGeneration, isApplicable
public V run(T operation) throws SVNException
ISvnOperationRunner
run
method for concrete working copy generationrun
in interface ISvnOperationRunner<V,T extends SvnOperation<V>>
operation
- operation that needs to be executedSVNException
public void reset(SvnWcGeneration wcGeneration)
ISvnOperationRunner
reset
in interface ISvnOperationRunner<V,T extends SvnOperation<V>>
wcGeneration
- new working copy generation for the runnerpublic void setWcContext(SVNWCContext context)
ISvnOperationRunner
setWcContext
in interface ISvnOperationRunner<V,T extends SvnOperation<V>>
context
- context of the operationprotected SVNWCContext getWcContext()
protected abstract V run() throws SVNException
SVNException
public void setOperation(T operation)
protected T getOperation()
public void checkCancelled() throws SVNCancelException
ISVNCanceller
checkCancelled
in interface ISVNCanceller
SVNCancelException
public void handleEvent(SVNEvent event, double progress) throws SVNException
ISVNEventHandler
Generally all operations represented by do*() methods of SVN*Client objects are followed by generating a sequence of events that are passed to the registered ISVNEventHandler object for custom processing. For example, during an update operation each local item being modified is signaled about by dispatching a specific for this item SVNEvent object to this method where this event can be scrutinized and handled in a desired way.
handleEvent
in interface ISVNEventHandler
event
- the current event that keeps detailed information on
the type of action occured and other attributes like path,
status, etc.progress
- currently reserved for future use; now it's value
is always set to ISVNEventHandler.UNKNOWN
SVNException
protected void handleEvent(SVNEvent event) throws SVNException
SVNException
Copyright © 2004-2012 TMate Software Ltd. All Rights Reserved.