Class AbstractClientAdapter
- java.lang.Object
-
- org.tigris.subversion.svnclientadapter.AbstractClientAdapter
-
- All Implemented Interfaces:
ISVNClientAdapter
public abstract class AbstractClientAdapter extends java.lang.Object implements ISVNClientAdapter
Default implementation of some of the methods of ISVNClientAdapter- Author:
- Cédric Chabanois (cchabanois at no-log.org), Panagiotis Korros (pkorros at bigfoot.com)
-
-
Field Summary
-
Fields inherited from interface org.tigris.subversion.svnclientadapter.ISVNClientAdapter
DEFAULT_LOG_PROPERTIES, REPOSITORY_FSTYPE_BDB, REPOSITORY_FSTYPE_FSFS
-
-
Constructor Summary
Constructors Constructor Description AbstractClientAdapter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SVNKeywordsaddKeywords(java.io.File path, SVNKeywords keywords)add some keyword to the keywords substitution listvoidaddPasswordCallback(ISVNPromptUserPassword callback)Add a callback for prompting for username, password SSL etc...voidaddToIgnoredPatterns(java.io.File path, java.lang.String pattern)add a pattern to svn:ignore propertybooleancanCommitAcrossWC()Indicates whether the commitAcrossWC method is supported in the adapterlong[]commitAcrossWC(java.io.File[] paths, java.lang.String message, boolean recurse, boolean keepLocks, boolean Atomic)Commits changes to the repository.voidcreatePatch(java.io.File[] paths, java.io.File relativeToPath, java.io.File outFile, boolean recurse)create a patch from local differences.voiddiff(java.io.File[] paths, java.io.File outFile, boolean recurse)display the combined differences for an array of paths.java.util.ListgetIgnoredPatterns(java.io.File path)get the ignored patterns for the given directory if path is not a directory, returns nullISVNInfogetInfo(SVNUrl url)Get information about an URL.SVNKeywordsgetKeywords(java.io.File path)returns the keywords used for substitution for the given resourceISVNLogMessage[]getLogMessages(java.io.File arg0, SVNRevision arg1, SVNRevision arg2)Get the log messages for a set of revision(s)ISVNLogMessage[]getLogMessages(java.io.File path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean fetchChangePath)Get the log messages for a set of revision(s)ISVNLogMessage[]getLogMessages(java.io.File path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath)Retrieve the log messages for an itemISVNLogMessage[]getLogMessages(java.io.File path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit)Retrieve the log messages for an itemISVNLogMessage[]getLogMessages(java.io.File path, SVNRevision pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit, boolean includeMergedRevisions)Retrieve the log messages for an itemISVNLogMessage[]getLogMessages(SVNUrl url, java.lang.String[] paths, SVNRevision revStart, SVNRevision revEnd, boolean stopOnCopy, boolean fetchChangePath)Get the log messages for a set paths and revision(s)ISVNLogMessage[]getLogMessages(SVNUrl arg0, SVNRevision arg1, SVNRevision arg2)Get the log messages for a set of revision(s)ISVNLogMessage[]getLogMessages(SVNUrl url, SVNRevision revisionStart, SVNRevision revisionEnd, boolean fetchChangePath)Get the log messages for a set of revision(s)ISVNLogMessage[]getLogMessages(SVNUrl url, SVNRevision pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit)Retrieve the log messages for an itemISVNLogMessage[]getLogMessages(SVNUrl url, SVNRevision pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit, boolean includeMergedRevisions)Retrieve the log messages for an itemstatic booleanisOsWindows()Answer whether running on Windows OS.voidmerge(SVNUrl path1, SVNRevision revision1, SVNUrl path2, SVNRevision revision2, java.io.File localPath, boolean force, boolean recurse)Merge changes from two paths into a new local path.voidmerge(SVNUrl path1, SVNRevision revision1, SVNUrl path2, SVNRevision revision2, java.io.File localPath, boolean force, boolean recurse, boolean dryRun)Merge changes from two paths into a new local path.voidmkdir(SVNUrl url, boolean makeParents, java.lang.String message)Creates a directory directly in a repositoryprotected voidnotImplementedYet()ISVNPropertypropertyGet(SVNUrl url, java.lang.String propertyName)get a property or null if property is not foundSVNKeywordsremoveKeywords(java.io.File path, SVNKeywords keywords)remove some keywords to the keywords substitution listvoidsetIgnoredPatterns(java.io.File path, java.util.List patterns)set the ignored patterns for the given directoryvoidsetKeywords(java.io.File path, SVNKeywords keywords, boolean recurse)set the keywords substitution for the given resourcebooleanstatusReturnsRemoteInfo()Indicates whether a status call that contacts the server includes the remote info in the status object-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.tigris.subversion.svnclientadapter.ISVNClientAdapter
addConflictResolutionCallback, addDirectory, addDirectory, addFile, addNotifyListener, annotate, annotate, annotate, annotate, annotate, cancelOperation, checkout, checkout, cleanup, commit, commit, copy, copy, copy, copy, copy, copy, copy, copy, copy, createRepository, diff, diff, diff, diff, diff, diff, diff, diff, diff, diffSummarize, diffSummarize, diffSummarize, dispose, doExport, doExport, doImport, getAdminDirectoryName, getContent, getContent, getContent, getDirEntry, getDirEntry, getInfo, getInfo, getInfo, getInfoFromWorkingCopy, getList, getList, getList, getList, getListWithLocks, getLogMessages, getLogMessages, getMergeInfo, getMergeInfo, getMergeinfoLog, getMergeinfoLog, getNotificationHandler, getPostCommitError, getProperties, getProperties, getProperties, getProperties, getProperties, getPropertiesIncludingInherited, getPropertiesIncludingInherited, getPropertiesIncludingInherited, getPropertiesIncludingInherited, getRevProperties, getRevProperty, getSingleStatus, getStatus, getStatus, getStatus, getStatus, getStatus, getStatus, isAdminDirectory, isThreadsafe, lock, lock, merge, merge, merge, mergeReintegrate, mkdir, mkdir, move, move, propertyDel, propertyGet, propertyGet, propertySet, propertySet, propertySet, relocate, remove, remove, removeNotifyListener, resolve, resolved, revert, setConfigDirectory, setPassword, setProgressListener, setRevProperty, setUsername, suggestMergeSources, suggestMergeSources, switchToUrl, switchToUrl, switchToUrl, switchToUrl, unlock, unlock, update, update, update, update, upgrade
-
-
-
-
Method Detail
-
setKeywords
public void setKeywords(java.io.File path, SVNKeywords keywords, boolean recurse) throws SVNClientExceptionDescription copied from interface:ISVNClientAdapterset the keywords substitution for the given resource- Specified by:
setKeywordsin interfaceISVNClientAdapter- Throws:
SVNClientException
-
addKeywords
public SVNKeywords addKeywords(java.io.File path, SVNKeywords keywords) throws SVNClientException
Description copied from interface:ISVNClientAdapteradd some keyword to the keywords substitution list- Specified by:
addKeywordsin interfaceISVNClientAdapter- Returns:
- keywords valid after this method call
- Throws:
SVNClientException
-
removeKeywords
public SVNKeywords removeKeywords(java.io.File path, SVNKeywords keywords) throws SVNClientException
Description copied from interface:ISVNClientAdapterremove some keywords to the keywords substitution list- Specified by:
removeKeywordsin interfaceISVNClientAdapter- Returns:
- keywords valid after this method call
- Throws:
SVNClientException
-
getIgnoredPatterns
public java.util.List getIgnoredPatterns(java.io.File path) throws SVNClientExceptionDescription copied from interface:ISVNClientAdapterget the ignored patterns for the given directory if path is not a directory, returns null- Specified by:
getIgnoredPatternsin interfaceISVNClientAdapter- Returns:
- list of ignored patterns
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(java.io.File arg0, SVNRevision arg1, SVNRevision arg2) throws SVNClientException
Description copied from interface:ISVNClientAdapterGet the log messages for a set of revision(s)- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Returns:
- The list of log messages.
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(SVNUrl arg0, SVNRevision arg1, SVNRevision arg2) throws SVNClientException
Description copied from interface:ISVNClientAdapterGet the log messages for a set of revision(s)- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Returns:
- The list of log messages.
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(SVNUrl url, java.lang.String[] paths, SVNRevision revStart, SVNRevision revEnd, boolean stopOnCopy, boolean fetchChangePath) throws SVNClientException
Description copied from interface:ISVNClientAdapterGet the log messages for a set paths and revision(s)- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Returns:
- The list of log messages.
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(java.io.File path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean fetchChangePath) throws SVNClientException
Description copied from interface:ISVNClientAdapterGet the log messages for a set of revision(s)- Specified by:
getLogMessagesin interfaceISVNClientAdapterfetchChangePath- Whether or not to interogate the repository for the verbose log information containing the list of paths touched by the delta specified byrevisionStartandrevisionEnd. Setting this tofalseresults in a more performant and memory efficient operation.- Returns:
- The list of log messages.
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(java.io.File path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath) throws SVNClientException
Description copied from interface:ISVNClientAdapterRetrieve the log messages for an item- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Parameters:
path- path or url to get the log message for.revisionStart- first revision to showrevisionEnd- last revision to showstopOnCopy- do not continue on copy operationsfetchChangePath- returns the paths of the changed items in the returned objects- Returns:
- array of LogMessages
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(java.io.File path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit) throws SVNClientException
Description copied from interface:ISVNClientAdapterRetrieve the log messages for an item- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Parameters:
path- path to get the log message for.revisionStart- first revision to showrevisionEnd- last revision to showstopOnCopy- do not continue on copy operationsfetchChangePath- returns the paths of the changed items in the returned objectslimit- limit the number of log messages (if 0 or less no limit)- Returns:
- array of LogMessages
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(SVNUrl url, SVNRevision revisionStart, SVNRevision revisionEnd, boolean fetchChangePath) throws SVNClientException
Description copied from interface:ISVNClientAdapterGet the log messages for a set of revision(s)- Specified by:
getLogMessagesin interfaceISVNClientAdapterfetchChangePath- Whether or not to interogate the repository for the verbose log information containing the list of paths touched by the delta specified byrevisionStartandrevisionEnd. Setting this tofalseresults in a more performant and memory efficient operation.- Returns:
- The list of log messages.
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(SVNUrl url, SVNRevision pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit) throws SVNClientException
Description copied from interface:ISVNClientAdapterRetrieve the log messages for an item- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Parameters:
url- url to get the log message for.pegRevision- peg revision for URLrevisionStart- first revision to showrevisionEnd- last revision to showstopOnCopy- do not continue on copy operationsfetchChangePath- returns the paths of the changed items in the returned objectslimit- limit the number of log messages (if 0 or less no limit)- Returns:
- array of LogMessages
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(java.io.File path, SVNRevision pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit, boolean includeMergedRevisions) throws SVNClientException
Description copied from interface:ISVNClientAdapterRetrieve the log messages for an item- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Parameters:
path- path to get the log message for.pegRevision- peg revision for URLrevisionStart- first revision to showrevisionEnd- last revision to showstopOnCopy- do not continue on copy operationsfetchChangePath- returns the paths of the changed items in the returned objectslimit- limit the number of log messages (if 0 or less no limit)includeMergedRevisions- include revisions that were merged- Returns:
- array of LogMessages
- Throws:
SVNClientException
-
getLogMessages
public ISVNLogMessage[] getLogMessages(SVNUrl url, SVNRevision pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit, boolean includeMergedRevisions) throws SVNClientException
Description copied from interface:ISVNClientAdapterRetrieve the log messages for an item- Specified by:
getLogMessagesin interfaceISVNClientAdapter- Parameters:
url- url to get the log message for.pegRevision- peg revision for URLrevisionStart- first revision to showrevisionEnd- last revision to showstopOnCopy- do not continue on copy operationsfetchChangePath- returns the paths of the changed items in the returned objectslimit- limit the number of log messages (if 0 or less no limit)includeMergedRevisions- include revisions that were merged- Returns:
- array of LogMessages
- Throws:
SVNClientException
-
setIgnoredPatterns
public void setIgnoredPatterns(java.io.File path, java.util.List patterns) throws SVNClientExceptionDescription copied from interface:ISVNClientAdapterset the ignored patterns for the given directory- Specified by:
setIgnoredPatternsin interfaceISVNClientAdapter- Throws:
SVNClientException
-
addToIgnoredPatterns
public void addToIgnoredPatterns(java.io.File path, java.lang.String pattern) throws SVNClientExceptionDescription copied from interface:ISVNClientAdapteradd a pattern to svn:ignore property- Specified by:
addToIgnoredPatternsin interfaceISVNClientAdapter- Throws:
SVNClientException
-
getKeywords
public SVNKeywords getKeywords(java.io.File path) throws SVNClientException
Description copied from interface:ISVNClientAdapterreturns the keywords used for substitution for the given resource- Specified by:
getKeywordsin interfaceISVNClientAdapter- Returns:
- the keywords used for substitution
- Throws:
SVNClientException
-
addPasswordCallback
public void addPasswordCallback(ISVNPromptUserPassword callback)
Description copied from interface:ISVNClientAdapterAdd a callback for prompting for username, password SSL etc...- Specified by:
addPasswordCallbackin interfaceISVNClientAdapter
-
statusReturnsRemoteInfo
public boolean statusReturnsRemoteInfo()
Description copied from interface:ISVNClientAdapterIndicates whether a status call that contacts the server includes the remote info in the status object- Specified by:
statusReturnsRemoteInfoin interfaceISVNClientAdapter- Returns:
- true when the client adapter implementation delivers remote info within status
-
commitAcrossWC
public long[] commitAcrossWC(java.io.File[] paths, java.lang.String message, boolean recurse, boolean keepLocks, boolean Atomic) throws SVNClientExceptionDescription copied from interface:ISVNClientAdapterCommits changes to the repository. This usually requires authentication, see Auth. This differs from the normal commit method in that it can accept paths from more than one working copy.- Specified by:
commitAcrossWCin interfaceISVNClientAdapter- Parameters:
paths- files to commit.message- log message.recurse- whether the operation should be done recursively.keepLocks- whether to keep locks on files that are committed.Atomic- whether to attempt to perform the commit from multiple working copies atomically. Files from the same repository will be processed with one commit operation. If files span multiple repositories they will be processed in multiple commits. When atomic is false, you will get one commit per WC.- Returns:
- Returns an array of longs representing the revisions. It returns a -1 if the revision number is invalid.
- Throws:
SVNClientException
-
notImplementedYet
protected void notImplementedYet() throws SVNClientException- Throws:
SVNClientException
-
canCommitAcrossWC
public boolean canCommitAcrossWC()
Description copied from interface:ISVNClientAdapterIndicates whether the commitAcrossWC method is supported in the adapter- Specified by:
canCommitAcrossWCin interfaceISVNClientAdapter- Returns:
- true when the client adapter implementation supports commitAcrossWC
-
mkdir
public void mkdir(SVNUrl url, boolean makeParents, java.lang.String message) throws SVNClientException
Description copied from interface:ISVNClientAdapterCreates a directory directly in a repository- Specified by:
mkdirin interfaceISVNClientAdapter- Throws:
SVNClientException
-
isOsWindows
public static boolean isOsWindows()
Answer whether running on Windows OS. (Actual code extracted from org.apache.commons.lang.SystemUtils.IS_OS_WINDOWS) (For such one simple method it does make sense to introduce dependency on whole commons-lang.jar)- Returns:
- true when the underlying
-
getInfo
public ISVNInfo getInfo(SVNUrl url) throws SVNClientException
Description copied from interface:ISVNClientAdapterGet information about an URL. Uses info2() call which contacts the repository- Specified by:
getInfoin interfaceISVNClientAdapter- Returns:
- information about an URL.
- Throws:
SVNClientException
-
merge
public void merge(SVNUrl path1, SVNRevision revision1, SVNUrl path2, SVNRevision revision2, java.io.File localPath, boolean force, boolean recurse, boolean dryRun) throws SVNClientException
Description copied from interface:ISVNClientAdapterMerge changes from two paths into a new local path.- Specified by:
mergein interfaceISVNClientAdapter- Parameters:
path1- first path or urlrevision1- first revisionpath2- second path or urlrevision2- second revisionlocalPath- target local pathforce- overwrite local changesrecurse- traverse into subdirectoriesdryRun- do not update working copy- Throws:
SVNClientException
-
merge
public void merge(SVNUrl path1, SVNRevision revision1, SVNUrl path2, SVNRevision revision2, java.io.File localPath, boolean force, boolean recurse) throws SVNClientException
Description copied from interface:ISVNClientAdapterMerge changes from two paths into a new local path.- Specified by:
mergein interfaceISVNClientAdapter- Parameters:
path1- first path or urlrevision1- first revisionpath2- second path or urlrevision2- second revisionlocalPath- target local pathforce- overwrite local changesrecurse- traverse into subdirectories- Throws:
SVNClientException
-
propertyGet
public ISVNProperty propertyGet(SVNUrl url, java.lang.String propertyName) throws SVNClientException
Description copied from interface:ISVNClientAdapterget a property or null if property is not found- Specified by:
propertyGetin interfaceISVNClientAdapter- Returns:
- a property or null
- Throws:
SVNClientException
-
diff
public void diff(java.io.File[] paths, java.io.File outFile, boolean recurse) throws SVNClientExceptionDescription copied from interface:ISVNClientAdapterdisplay the combined differences for an array of paths.- Specified by:
diffin interfaceISVNClientAdapter- Throws:
SVNClientException
-
createPatch
public void createPatch(java.io.File[] paths, java.io.File relativeToPath, java.io.File outFile, boolean recurse) throws SVNClientExceptionDescription copied from interface:ISVNClientAdaptercreate a patch from local differences.- Specified by:
createPatchin interfaceISVNClientAdapterrelativeToPath- - create patch relative to this location- Throws:
SVNClientException
-
-