|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmatesoft.svn.core.wc2.SvnOperationFactory
public class SvnOperationFactory
Represents factory for the Svn* operations.
Contains corresponding create*() methods for all supported operations.
Provides operation options by implementing ISvnOperationOptionsProvider
interface.
Handles working copy access and provides access to it getWcContext()
, isAutoCloseContext()
.
Has set of working copy utility methods: getWorkingCopyRoot(File, boolean)
, isWorkingCopyRoot(File)
,
isVersionedDirectory(File)
, detectWcGeneration(File, boolean)
,
setPrimaryWcGeneration(SvnWcGeneration)
, isPrimaryWcGenerationOnly()
Constructor Summary | |
---|---|
SvnOperationFactory()
Creates operation factory and initializes it with empty context . |
|
SvnOperationFactory(org.tmatesoft.svn.core.internal.wc17.SVNWCContext context)
Creates operation factory and initializes it with context . |
Method Summary | |
---|---|
SvnAnnotate |
createAnnotate()
Creates annotate operation. |
SvnCanonicalizeUrls |
createCanonicalizeUrls()
Creates canonicalize URLs operation. |
SvnCat |
createCat()
Creates cat operation. |
SvnCheckout |
createCheckout()
Creates checkout operation. |
SvnCleanup |
createCleanup()
Creates cleanup operation. |
SvnCommit |
createCommit()
Creates commit operation. |
SvnCopy |
createCopy()
Creates copy operation. |
SvnDiff |
createDiff()
Creates diff operation. |
SvnDiffSummarize |
createDiffSummarize()
Creates diff summarize operation. |
SvnExport |
createExport()
Creates export operation. |
SvnGetChangelistPaths |
createGetChangelistPaths()
Creates get changelist paths operation. |
SvnGetInfo |
createGetInfo()
Creates get info operation. |
SvnGetMergeInfo |
createGetMergeInfo()
Creates get merge info operation. |
SvnGetProperties |
createGetProperties()
Creates get properties operation. |
SvnGetStatus |
createGetStatus()
Creates get status operation. |
SvnGetStatusSummary |
createGetStatusSummary()
Creates get status summary operation. |
SvnImport |
createImport()
Creates import operation. |
SvnList |
createList()
Creates list operation. |
SvnLog |
createLog()
Creates log operation. |
SvnLogMergeInfo |
createLogMergeInfo()
Creates log merge info operation. |
SvnMarkReplaced |
createMarkReplaced()
Creates mark replaced operation. |
SvnMerge |
createMerge()
Creates merge operation. |
SvnRemoteMkDir |
createMkDir()
Creates remote make directory operation. |
SvnRelocate |
createRelocate()
Creates relocate operation. |
SvnRemoteCopy |
createRemoteCopy()
Creates remote copy operation. |
SvnRemoteDelete |
createRemoteDelete()
Creates remote delete operation. |
SvnRemoteMkDir |
createRemoteMkDir()
Creates remote make directory operation. |
SvnRemoteSetProperty |
createRemoteSetProperty()
Creates remote set property operation. |
SvnRepositoryCopyRevisionProperties |
createRepositoryCopyRevisionProperties()
Creates copy revision properties synchronization operation. |
SvnRepositoryCreate |
createRepositoryCreate()
Creates repository create administrative operation. |
SvnRepositoryDump |
createRepositoryDump()
Creates repository dump administrative operation. |
SvnRepositoryFilter |
createRepositoryFilter()
Creates dumpfilter operation. |
SvnRepositoryGetAuthor |
createRepositoryGetAuthor()
Creates operation for retrieving author from the repository. |
SvnRepositoryCat |
createRepositoryGetCat()
Creates operation for retrieving file contents from the repository. |
SvnRepositoryGetChanged |
createRepositoryGetChanged()
Creates operation for retrieving changed paths from the repository. |
SvnRepositoryGetChangedDirectories |
createRepositoryGetChangedDirectories()
Creates operation for retrieving changed directories from the repository. |
SvnRepositoryGetDate |
createRepositoryGetDate()
Creates operation for retrieving date from the repository. |
SvnRepositoryGetDiff |
createRepositoryGetDiff()
Creates repository diff operation. |
SvnRepositoryGetHistory |
createRepositoryGetHistory()
Creates operation for retrieving the history from the repository. |
SvnRepositoryGetInfo |
createRepositoryGetInfo()
Creates operation for retrieving info from the repository. |
SvnRepositoryGetLock |
createRepositoryGetLock()
Creates operation for retrieving the lock from the repository. |
SvnRepositoryGetLog |
createRepositoryGetLog()
Creates operation for retrieving repository log. |
SvnRepositoryGetProperties |
createRepositoryGetProperties()
Creates operation for retrieving properties from the repository. |
SvnRepositoryGetProperty |
createRepositoryGetProperty()
Creates operation for retrieving property from the repository. |
SvnRepositoryGetRevisionProperties |
createRepositoryGetRevisionProperties()
Creates operation for retrieving revision properties from the repository. |
SvnRepositoryGetRevisionProperty |
createRepositoryGetRevisionProperty()
Creates operation for retrieving revision property from the repository. |
SvnRepositoryGetTree |
createRepositoryGetTree()
Creates operation for retrieving items tree from the repository. |
SvnRepositoryGetUUID |
createRepositoryGetUUID()
Creates operation for retrieving repository UUID. |
SvnRepositoryGetYoungest |
createRepositoryGetYoungest()
Creates operation for retrieving the latest revision from the repository. |
SvnRepositoryHotCopy |
createRepositoryHotCopy()
Creates repository hot copy administrative operation. |
SvnRepositoryInitialize |
createRepositoryInitialize()
Creates initialize synchronization operation. |
SvnRepositoryListLocks |
createRepositoryListLocks()
Creates administrative operation for retrieving list of locks from the repository. |
SvnRepositoryListTransactions |
createRepositoryListTransactions()
Creates administrative operation for retrieving list of transactions from the repository. |
SvnRepositoryLoad |
createRepositoryLoad()
Creates repository load administrative operation. |
SvnRepositoryPack |
createRepositoryPack()
Creates repository pack administrative operation. |
SvnRepositoryRecover |
createRepositoryRecover()
Creates repository recover administrative operation. |
SvnRepositoryRemoveLocks |
createRepositoryRemoveLocks()
Creates repository remove locks administrative operation. |
SvnRepositoryRemoveTransactions |
createRepositoryRemoveTransactions()
Creates repository remove transactions administrative operation. |
SvnRepositorySetUUID |
createRepositorySetUUID()
Creates repository set UUID administrative operation. |
SvnRepositorySynchronize |
createRepositorySynchronize()
Creates repository synchronize operation. |
SvnRepositorySyncInfo |
createRepositorySyncInfo()
Creates operation for retrieving repository synchronization info. |
SvnRepositoryUpgrade |
createRepositoryUpgrade()
Creates repository upgrade administrative operation. |
SvnRepositoryVerify |
createRepositoryVerify()
Creates repository verify administrative operation. |
SvnResolve |
createResolve()
Creates resolve operation. |
SvnRevert |
createRevert()
Creates revert operation. |
SvnScheduleForAddition |
createScheduleForAddition()
Creates add operation. |
SvnScheduleForRemoval |
createScheduleForRemoval()
Creates delete operation. |
SvnSetChangelist |
createSetChangelist()
Creates set changelist operation. |
SvnSetLock |
createSetLock()
Creates set lock operation. |
SvnSetProperty |
createSetProperty()
Creates set property operation. |
SvnSuggestMergeSources |
createSuggestMergeSources()
Creates suggest merge sources operation. |
SvnSwitch |
createSwitch()
Creates switch operation. |
SvnUnlock |
createUnlock()
Creates unlock operation. |
SvnUpdate |
createUpdate()
Creates update operation. |
SvnUpgrade |
createUpgrade()
Creates upgrade operation. |
static org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration |
detectWcGeneration(java.io.File path,
boolean climbUp)
Detects working copy generation (1.6 or 1.7 format) by the working copy path. |
static org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration |
detectWcGeneration(java.io.File path,
boolean climbUp,
boolean isAdditionMode)
Detects working copy generation (1.6 or 1.7 format) by the working copy path in (not in) the addition mode. |
void |
dispose()
Disposes context and repository pool if needed. |
ISVNAuthenticationManager |
getAuthenticationManager()
Gets operation's authentication manager. |
ISVNCanceller |
getCanceller()
Gets the cancel handler of the operation. |
ISVNEventHandler |
getEventHandler()
Gets the event handler for the operation. |
protected ISvnOperationRunner<?,SvnOperation<?>> |
getImplementation(SvnOperation<?> operation)
|
ISvnOperationHandler |
getOperationHandler()
Get a callback that is called before and after each operation |
ISVNOptions |
getOptions()
Gets operation's options. |
org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration |
getPrimaryWcGeneration()
Returns primary (default) working copy generation. |
ISVNRepositoryPool |
getRepositoryPool()
Gets the pool of repositories. |
org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration |
getSecondaryWcGeneration()
Returns secondary working copy generation. |
org.tmatesoft.svn.core.internal.wc17.SVNWCContext |
getWcContext()
Returns working copy context. |
static java.io.File |
getWorkingCopyRoot(java.io.File versionedDir,
boolean stopOnExternals)
Searches working copy root path by the versioned directory. |
boolean |
isAutoCloseContext()
Returns whether to dispose context when operation finishes. |
boolean |
isPrimaryWcGenerationOnly()
Returns whether the operations should work only on primary working copy generation (for example only on SVN 1.7 working copy) or on both primary and secondary generations. |
static boolean |
isVersionedDirectory(java.io.File directory)
Detects whether the directory is versioned directory. |
static boolean |
isVersionedDirectory(java.io.File directory,
boolean isAdditionMode)
Detects whether the directory is versioned directory in or (not in) the addition mode. |
static boolean |
isWorkingCopyRoot(java.io.File versionedDir)
Detects whether the versioned directory is working copy root. |
protected void |
registerOperationRunner(java.lang.Class<?> operationClass,
ISvnOperationRunner<?,? extends SvnOperation<?>> runner)
|
protected java.lang.Object |
run(SvnOperation<?> operation)
|
void |
setAuthenticationManager(ISVNAuthenticationManager authenticationManager)
Sets operation's authentication manager. |
void |
setAutoCloseContext(boolean autoCloseContext)
Sets whether to dispose context when operation finishes. |
void |
setCanceller(ISVNCanceller canceller)
Sets the cancel handler of the operation. |
void |
setEventHandler(ISVNEventHandler eventHandler)
Sets the event handler for the operation. |
void |
setOperationHandler(ISvnOperationHandler operationHandler)
Sets a callback that is called before and after each operation |
void |
setOptions(ISVNOptions options)
Sets operation's options and disposes working copy context. |
void |
setPrimaryWcGeneration(org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration primaryWcGeneration)
(Re)sets primary (default) working copy generation. |
void |
setRepositoryPool(ISVNRepositoryPool repositoryPool)
Sets pool of repositories. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SvnOperationFactory()
context
.
public SvnOperationFactory(org.tmatesoft.svn.core.internal.wc17.SVNWCContext context)
context
.
If context
is set, retrieves its options
and eventHandler
and sets autoCloseContext
to false
, otherwise
sets autoCloseContext
to true
.
context
- operation's contextMethod Detail |
---|
public boolean isAutoCloseContext()
true
if the context should be disposed, otherwise false
public void setAutoCloseContext(boolean autoCloseContext)
autoCloseContext
- true
if the context should be disposed, otherwise false
public ISVNAuthenticationManager getAuthenticationManager()
getAuthenticationManager
in interface ISvnOperationOptionsProvider
public ISVNCanceller getCanceller()
canceler
is not set,
returns eventHandler
as a canceler.
getCanceller
in interface ISvnOperationOptionsProvider
public ISVNEventHandler getEventHandler()
SVNEvent
objects to provide detailed information about
actions and progress state of version control operations.
If wcContext
is set, returns SVNWCContext.getEventHandler()
getEventHandler
in interface ISvnOperationOptionsProvider
ISVNEventHandler
public ISvnOperationHandler getOperationHandler()
public ISVNRepositoryPool getRepositoryPool()
DefaultSVNRepositoryPool
with the authentication manager, options, and autoDisposeRepositoryPool
= true
.
getRepositoryPool
in interface ISvnOperationOptionsProvider
public ISVNOptions getOptions()
getOptions
in interface ISvnOperationOptionsProvider
public void setAuthenticationManager(ISVNAuthenticationManager authenticationManager)
repositoryPool
is set, set its authentication manager to this value.
authenticationManager
- authentication managerpublic void setCanceller(ISVNCanceller canceller)
canceller
- cancel handlerpublic void setEventHandler(ISVNEventHandler eventHandler)
SVNEvent
objects to provide detailed information about
actions and progress state of version control operations.
If wcContext
is set, sets its event handler to this one.
If wcContext
is not set, disposes it.
eventHandler
- handler for eventsISVNEventHandler
public void setOptions(ISVNOptions options)
options
- options of the operationpublic void setRepositoryPool(ISVNRepositoryPool repositoryPool)
repositoryPool
is not null
sets autoDisposeRepositoryPool
to false
,
otherwise to true
repositoryPool
- pool of repositoriespublic void setOperationHandler(ISvnOperationHandler operationHandler)
operationHandler
- callback to call before and after operationpublic void dispose()
public SvnAnnotate createAnnotate()
SvnAnnotate
objectpublic SvnCat createCat()
SvnCat
objectpublic SvnImport createImport()
SvnImport
objectpublic SvnCopy createCopy()
SvnCat
objectpublic SvnRemoteCopy createRemoteCopy()
SvnRemoteCopy
objectpublic SvnRemoteMkDir createRemoteMkDir()
SvnRemoteMkDir
objectpublic SvnRemoteSetProperty createRemoteSetProperty()
SvnRemoteSetProperty
objectpublic SvnSetChangelist createSetChangelist()
SvnSetChangelist
objectpublic SvnGetChangelistPaths createGetChangelistPaths()
SvnGetChangelistPaths
objectpublic SvnSetLock createSetLock()
SvnSetLock
objectpublic SvnUnlock createUnlock()
SvnUnlock
objectpublic SvnUpgrade createUpgrade()
SvnUpgrade
objectpublic SvnGetInfo createGetInfo()
SvnGetInfo
objectpublic SvnGetProperties createGetProperties()
SvnGetProperties
objectpublic SvnGetStatus createGetStatus()
SvnGetStatus
objectpublic SvnUpdate createUpdate()
SvnUpdate
objectpublic SvnSwitch createSwitch()
SvnSwitch
objectpublic SvnCheckout createCheckout()
SvnCheckout
objectpublic SvnRelocate createRelocate()
SvnRelocate
objectpublic SvnExport createExport()
SvnExport
objectpublic SvnScheduleForAddition createScheduleForAddition()
SvnScheduleForAddition
objectpublic SvnCommit createCommit()
SvnCommit
objectpublic SvnScheduleForRemoval createScheduleForRemoval()
SvnScheduleForRemoval
objectpublic SvnMarkReplaced createMarkReplaced()
SvnMarkReplaced
objectpublic SvnRevert createRevert()
SvnRevert
objectpublic SvnSetProperty createSetProperty()
SvnSetProperty
objectpublic SvnLog createLog()
SvnLog
objectpublic SvnRemoteMkDir createMkDir()
SvnRemoteMkDir
objectpublic SvnRemoteDelete createRemoteDelete()
SvnRemoteDelete
objectpublic SvnMerge createMerge()
SvnMerge
objectpublic SvnDiff createDiff()
SvnDiff
objectpublic SvnDiffSummarize createDiffSummarize()
SvnDiffSummarize
objectpublic SvnSuggestMergeSources createSuggestMergeSources()
SvnSuggestMergeSources
objectpublic SvnGetMergeInfo createGetMergeInfo()
SvnGetMergeInfo
objectpublic SvnLogMergeInfo createLogMergeInfo()
SvnLogMergeInfo
objectpublic SvnResolve createResolve()
SvnResolve
objectpublic SvnCleanup createCleanup()
SvnCleanup
objectpublic SvnList createList()
SvnList
objectpublic SvnCanonicalizeUrls createCanonicalizeUrls()
SvnCanonicalizeUrls
objectpublic SvnRepositoryDump createRepositoryDump()
SvnRepositoryDump
objectpublic SvnRepositoryCreate createRepositoryCreate()
SvnRepositoryCreate
objectpublic SvnRepositoryHotCopy createRepositoryHotCopy()
SvnRepositoryHotCopy
objectpublic SvnRepositoryLoad createRepositoryLoad()
SvnRepositoryLoad
objectpublic SvnRepositoryListLocks createRepositoryListLocks()
SvnRepositoryListLocks
objectpublic SvnRepositoryListTransactions createRepositoryListTransactions()
SvnRepositoryListTransactions
objectpublic SvnRepositoryPack createRepositoryPack()
SvnRepositoryPack
objectpublic SvnRepositoryRecover createRepositoryRecover()
SvnRepositoryRecover
objectpublic SvnRepositoryRemoveLocks createRepositoryRemoveLocks()
SvnRepositoryRemoveLocks
objectpublic SvnRepositoryRemoveTransactions createRepositoryRemoveTransactions()
SvnRepositoryRemoveTransactions
objectpublic SvnRepositorySetUUID createRepositorySetUUID()
SvnRepositorySetUUID
objectpublic SvnRepositoryUpgrade createRepositoryUpgrade()
SvnRepositoryUpgrade
objectpublic SvnRepositoryVerify createRepositoryVerify()
SvnRepositoryVerify
objectpublic SvnRepositoryInitialize createRepositoryInitialize()
SvnRepositoryInitialize
objectpublic SvnRepositorySyncInfo createRepositorySyncInfo()
SvnRepositorySyncInfo
objectpublic SvnRepositoryCopyRevisionProperties createRepositoryCopyRevisionProperties()
SvnRepositoryCopyRevisionProperties
objectpublic SvnRepositorySynchronize createRepositorySynchronize()
SvnRepositorySynchronize
objectpublic SvnRepositoryFilter createRepositoryFilter()
SvnRepositoryFilter
objectpublic SvnRepositoryGetAuthor createRepositoryGetAuthor()
SvnRepositoryGetAuthor
objectpublic SvnRepositoryGetDate createRepositoryGetDate()
SvnRepositoryGetDate
objectpublic SvnRepositoryGetInfo createRepositoryGetInfo()
SvnRepositoryGetInfo
objectpublic SvnRepositoryGetLock createRepositoryGetLock()
SvnRepositoryGetLock
objectpublic SvnRepositoryGetLog createRepositoryGetLog()
SvnRepositoryGetLog
objectpublic SvnRepositoryGetUUID createRepositoryGetUUID()
SvnRepositoryGetUUID
objectpublic SvnRepositoryGetYoungest createRepositoryGetYoungest()
SvnRepositoryGetYoungest
objectpublic SvnRepositoryGetProperty createRepositoryGetProperty()
SvnRepositoryGetProperty
objectpublic SvnRepositoryGetRevisionProperty createRepositoryGetRevisionProperty()
SvnRepositoryGetRevisionProperty
objectpublic SvnRepositoryGetProperties createRepositoryGetProperties()
SvnRepositoryGetProperties
objectpublic SvnRepositoryCat createRepositoryGetCat()
SvnRepositoryCat
objectpublic SvnRepositoryGetChanged createRepositoryGetChanged()
SvnRepositoryGetChanged
objectpublic SvnRepositoryGetChangedDirectories createRepositoryGetChangedDirectories()
SvnRepositoryGetChangedDirectories
objectpublic SvnRepositoryGetDiff createRepositoryGetDiff()
SvnRepositoryGetDiff
objectpublic SvnRepositoryGetHistory createRepositoryGetHistory()
SvnRepositoryGetHistory
objectpublic SvnRepositoryGetTree createRepositoryGetTree()
SvnRepositoryGetTree
objectpublic SvnRepositoryGetRevisionProperties createRepositoryGetRevisionProperties()
SvnRepositoryGetRevisionProperties
objectpublic SvnGetStatusSummary createGetStatusSummary()
SvnStatusSummary
objectprotected java.lang.Object run(SvnOperation<?> operation) throws SVNException
SVNException
protected ISvnOperationRunner<?,SvnOperation<?>> getImplementation(SvnOperation<?> operation) throws SVNException
SVNException
public boolean isPrimaryWcGenerationOnly()
true
operations should work only on primary working copy generation,
if false
both primary and secondary generations are supportedprotected void registerOperationRunner(java.lang.Class<?> operationClass, ISvnOperationRunner<?,? extends SvnOperation<?>> runner)
public static boolean isWorkingCopyRoot(java.io.File versionedDir)
versionedDir
- directory to check
true
if the directory is working copy root, otherwise false
public static boolean isVersionedDirectory(java.io.File directory)
directory
- directory to check
true
if the directory is versioned directory, otherwise false
public static boolean isVersionedDirectory(java.io.File directory, boolean isAdditionMode)
directory
- directory to checkisAdditionMode
- true
if it is addition mode, otherwise false
true
if the directory is versioned directory, otherwise false
public static java.io.File getWorkingCopyRoot(java.io.File versionedDir, boolean stopOnExternals) throws SVNException
versionedDir
- versioned directorystopOnExternals
- true
if externals should not be searched, otherwise false
SVNException
public static org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration detectWcGeneration(java.io.File path, boolean climbUp) throws SVNException
climbUp
is true
.
path
- working copy pathclimbUp
- true
if search recursively in path's parents, otherwise false
SVNException
public static org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration detectWcGeneration(java.io.File path, boolean climbUp, boolean isAdditionMode) throws SVNException
climbUp
is true
.
path
- working copy pathclimbUp
- true
if search recursively in path's parents, otherwise false
isAdditionMode
- true
if it is addition mode, otherwise false
SVNException
public org.tmatesoft.svn.core.internal.wc17.SVNWCContext getWcContext()
public org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration getPrimaryWcGeneration()
public org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration getSecondaryWcGeneration()
public void setPrimaryWcGeneration(org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration primaryWcGeneration)
primaryWcGeneration
is not null
,
registers operations' runners.
primaryWcGeneration
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |