Package org.tmatesoft.svn.core.wc2
Class SvnReceivingOperation<T>
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<T>
-
- org.tmatesoft.svn.core.wc2.SvnReceivingOperation<T>
-
- Type Parameters:
T
- type of received object(s)
- All Implemented Interfaces:
ISvnObjectReceiver<T>
,ISvnOperationOptionsProvider
- Direct Known Subclasses:
AbstractSvnCommit
,SvnAnnotate
,SvnDiffSummarize
,SvnGetChangelistPaths
,SvnGetInfo
,SvnGetProperties
,SvnGetStatus
,SvnList
,SvnLog
,SvnLogMergeInfo
,SvnRepositoryFilter
,SvnRepositoryInitialize
,SvnRepositoryReceivingOperation
,SvnRepositorySynchronize
,SvnSetLock
,SvnSetProperty
,SvnUnlock
public class SvnReceivingOperation<T> extends SvnOperation<T> implements ISvnObjectReceiver<T>
Represents base class for all operations that can fetch object(s) for custom processing. Clients can provide their own handlers for receiving the object(s) by implementingISvnObjectReceiver
interface and assign it insetReceiver(ISvnObjectReceiver)
.- Version:
- 1.7
- Author:
- TMate Software Ltd.
- See Also:
SvnOperation
,ISvnObjectReceiver
,SvnAnnotate
,SvnDiffSummarize
,SvnGetChangelistPaths
,SvnGetInfo
,SvnGetProperties
,SvnGetStatus
,SvnList
,SvnLog
,SvnLogMergeInfo
,SvnSetLock
,SvnSetProperty
,SvnUnlock
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SvnReceivingOperation(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
first()
Returns first received object from the list.ISvnObjectReceiver<T>
getReceiver()
Returns client's object receiver.protected void
initDefaults()
T
last()
Returns last received object from the list.void
receive(SvnTarget target, T object)
Receives the object, adds it to objects list and calls client's receiver if exists.java.util.Collection<T>
run(java.util.Collection<T> objects)
Initializes list for received objects withobjects
or creates an empty list, calls the operation'sSvnOperation.run()
method.void
setReceiver(ISvnObjectReceiver<T> receiver)
Sets client's object receiver.-
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, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isChangesWorkingCopy, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnReceivingOperation
protected SvnReceivingOperation(SvnOperationFactory factory)
-
-
Method Detail
-
setReceiver
public void setReceiver(ISvnObjectReceiver<T> receiver)
Sets client's object receiver.- Parameters:
receiver
- object receiver
-
getReceiver
public ISvnObjectReceiver<T> getReceiver()
Returns client's object receiver.- Returns:
- object receiver
-
receive
public void receive(SvnTarget target, T object) throws SVNException
Receives the object, adds it to objects list and calls client's receiver if exists.- Specified by:
receive
in interfaceISvnObjectReceiver<T>
- Parameters:
target
- target of the objectobject
- object- Throws:
SVNException
-
first
public T first()
Returns first received object from the list.- Returns:
- first received object
-
last
public T last()
Returns last received object from the list.- Returns:
- first received object
-
run
public java.util.Collection<T> run(java.util.Collection<T> objects) throws SVNException
Initializes list for received objects withobjects
or creates an empty list, calls the operation'sSvnOperation.run()
method.- Parameters:
objects
-- Returns:
- list of received objects
- Throws:
SVNException
-
initDefaults
protected void initDefaults()
- Overrides:
initDefaults
in classSvnOperation<T>
-
-