Java Doc for SVNRepository.java in  » Source-Control » tmatesoft-SVN » org » tmatesoft » svn » core » io » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Source Control » tmatesoft SVN » org.tmatesoft.svn.core.io 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.tmatesoft.svn.core.io.SVNRepository

All known Subclasses:   org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl,  org.tmatesoft.svn.core.internal.io.dav.DAVRepository,  org.tmatesoft.svn.core.internal.io.fs.FSRepository,
SVNRepository
abstract public class SVNRepository (Code)
The abstract class SVNRepository provides an interface for protocol specific drivers used for direct working with a Subversion repository. SVNRepository joins all low-level API methods needed for repository access operations.

In particular this low-level protocol driver is used by the high-level API (represented by the org.tmatesoft.svn.core.wc package) when an access to a repository is needed.

It is important to say that before using the library it must be configured according to implimentations to be used. That is if a repository is assumed to be accessed either via the WebDAV protocol (http:// or https://), or a custom svn one (svn:// or svn+ssh://) or immediately on the local machine (file:///) a user must initialize the library in a proper way:

 //import neccessary classes
 import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory;
 import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
 import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl;
 import org.tmatesoft.svn.core.SVNURL;
 import org.tmatesoft.svn.core.io.SVNRepository;
 import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
 import import org.tmatesoft.svn.core.wc.SVNWCUtil;
 import import org.tmatesoft.svn.core.SVNException;
 ...
 //Set up connection protocols support:
 //http:// and https://
 DAVRepositoryFactory.setup();
 //svn://, svn+xxx:// (svn+ssh:// in particular)
 SVNRepositoryFactoryImpl.setup();
 //file:///
 FSRepositoryFactory.setup();
 
svn+xxx:// can be any tunnel scheme for tunneled working with a repository. xxx URL scheme is looked up in the section tunnels of the standard Subversion config file.

So, only after these setup steps the client can create http | svn | file protocol implementations of the SVNRepository abstract class to access the repository.

This is a general way how a user creates an SVNRepository driver object:

 String url="http://svn.collab.net/svn/trunk";
 String name="my name";
 String password="my password";
 repository = null;
 try { 
 repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url));
 ISVNAuthenticationManager authManager = 
 SVNWCUtil.createDefaultAuthenticationManager(name, password);
 repository.setAuthenticationManager(authManager);
 ...
 } catch (SVNException e){
 e.printStackTrace();
 System.exit(1);
 }
 //work with the repository
 ... 

SVNRepository objects are not thread-safe, we're strongly recommend you not to use one SVNRepository object from within multiple threads.

Also methods of SVNRepository objects are not reenterable - that is, you can not call operation methods of an SVNRepository driver neither from within those handlers that are passed to some of the driver's methods, nor during committing with the help of a commit editor (until the editor's ISVNEditor.closeEdit closeEdit() method is called).

To authenticate a user over network SVNRepository drivers use ISVNAuthenticationManager auth drivers.
version:
   1.1.1
author:
   TMate Software Ltd.
See Also:   SVNRepositoryFactory
See Also:   org.tmatesoft.svn.core.auth.ISVNAuthenticationManager
See Also:    Examples



Field Summary
protected  SVNURLmyLocation
    
protected  SVNURLmyRepositoryRoot
    
protected  StringmyRepositoryUUID
    

Constructor Summary
protected  SVNRepository(SVNURL location, ISVNSession options)
    

Method Summary
public  voidaddConnectionListener(ISVNConnectionListener listener)
    
protected static  voidassertValidRevision(long revision)
    
abstract public  SVNNodeKindcheckPath(String path, long revision)
     Returns the kind of an item located at the specified path in a particular revision.
public  voidcheckout(long revision, String target, boolean recursive, ISVNEditor editor)
     Checks out a directory from a repository .

target is the name (one-level path component) of an entry that will restrict the scope of the checkout to this entry.

abstract public  voidcloseSession()
     Closes the current session closing a socket connection used by this object.
abstract public  voiddiff(SVNURL url, long targetRevision, long revision, String target, boolean ignoreAncestry, boolean recursive, boolean getContents, ISVNReporterBaton reporter, ISVNEditor editor)
     Calculates the differences between two items.
abstract public  voiddiff(SVNURL url, long targetRevision, long revision, String target, boolean ignoreAncestry, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor)
    
abstract public  voiddiff(SVNURL url, long revision, String target, boolean ignoreAncestry, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor)
     Calculates the differences between two items.
protected  voidfireConnectionClosed()
    
protected  voidfireConnectionOpened()
    
public  ISVNAuthenticationManagergetAuthenticationManager()
     Returns the authentication driver registered for this object.
public  ISVNCancellergetCanceller()
    
public  ISVNEditorgetCommitEditor(String logMessage, ISVNWorkspaceMediator mediator)
     Gets an editor for committing changes to a repository.
abstract public  ISVNEditorgetCommitEditor(String logMessage, Map locks, boolean keepLocks, ISVNWorkspaceMediator mediator)
     Gets an editor for committing changes to a repository.
abstract public  longgetDatedRevision(Date date)
     Returns the recent repository revision number for the particular moment in time - the closest one before or at the specified datestamp.
public  ISVNDebugLoggetDebugLog()
     Returns the debug logger currently in use.
abstract public  longgetDir(String path, long revision, Map properties, ISVNDirEntryHandler handler)
     Fetches the contents and/or properties of a directory located at the specified path in a particular revision.
public  CollectiongetDir(String path, long revision, Map properties, Collection dirEntries)
     Fetches the contents and properties of a directory located at the specified path in a particular revision.
abstract public  SVNDirEntrygetDir(String path, long revision, boolean includeCommitMessages, Collection entries)
     Fetches the contents of a directory into the provided collection object and returns the directory entry itself.
abstract public  longgetFile(String path, long revision, Map properties, OutputStream contents)
     Fetches the contents and/or properties of a file located at the specified path in a particular revision.

If contents arg is not null it will be written with file contents.

If properties arg is not null it will receive the properties of the file.

abstract public  intgetFileRevisions(String path, long startRevision, long endRevision, ISVNFileRevisionHandler handler)
     Retrieves interesting file revisions for the specified file.
public  CollectiongetFileRevisions(String path, Collection revisions, long sRevision, long eRevision)
     Retrieves and returns interesting file revisions for the specified file.
public  StringgetFullPath(String relativeOrRepositoryPath)
     Resolves a path, relative either to the location to which this driver object is set or to the repository root directory, to a path, relative to the host.
abstract public  longgetLatestRevision()
     Returns the number of the latest revision of the repository this driver is working with.
public  SVNURLgetLocation()
     Returns the repository location to which this object is set.
abstract public  intgetLocations(String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler)
     Gets entry locations in time.
public  CollectiongetLocations(String path, Collection entries, long pegRevision, long[] revisions)
     Gets entry locations in time.
public  MapgetLocations(String path, Map entries, long pegRevision, long[] revisions)
     Gets entry locations in time.
abstract public  SVNLockgetLock(String path)
     Gets the lock for the file located at the specified path.
abstract public  SVNLock[]getLocks(String path)
     Gets all locks on or below the path, that is if the repository entry (located at the path) is a directory then the method returns locks of all locked files (if any) in it.
public  ISVNSessiongetOptions()
     Returns the session options object this driver is using. If no options object was provided to create this driver then it uses a default one - ISVNSession.DEFAULT .
public  StringgetRepositoryPath(String relativePath)
     Returns a path relative to the repository root directory given a path relative to the location to which this driver object is set.
public  SVNURLgetRepositoryRoot()
    
public  SVNURLgetRepositoryRoot(boolean forceConnection)
     Gets a repository's root directory location.
public  StringgetRepositoryUUID()
    
public  StringgetRepositoryUUID(boolean forceConnection)
     Gets the Universal Unique IDentifier (UUID) of the repository this driver is created for.
protected static  LonggetRevisionObject(long revision)
    
abstract public  MapgetRevisionProperties(long revision, Map properties)
     Returns unversioned revision properties for a particular revision. Property names (keys) are mapped to their values.
abstract public  StringgetRevisionPropertyValue(long revision, String propertyName)
     Gets the value of an unversioned property.
public  ISVNTunnelProvidergetTunnelProvider()
     Returns a tunnel provider.
abstract public  SVNDirEntryinfo(String path, long revision)
     Gives information about an entry located at the specified path in a particular revision.
protected static  booleanisInvalidRevision(long revision)
    
protected static  booleanisValidRevision(long revision)
    
abstract public  voidlock(Map pathsToRevisions, String comment, boolean force, ISVNLockHandler handler)
     Locks path(s) at definite revision(s).

Note that locking is never anonymous, so any server implementing this function will have to "pull" a username from the client, if it hasn't done so already.

Each path to be locked is handled with the provided handler. If a path was successfully locked, the handler's ISVNLockHandler.handleLock(StringSVNLockSVNErrorMessage) handleLock() is called that receives the path and either a lock object (representing the lock that was set on the path) or an error exception, if locking failed for that path.

If any path is already locked by a different user and the force flag is false, then this call fails with throwing an SVNException.

protected synchronized  voidlock()
    
protected synchronized  voidlock(boolean force)
    
public  longlog(String[] targetPaths, long startRevision, long endRevision, boolean changedPath, boolean strictNode, ISVNLogEntryHandler handler)
     Traverses revisions history.
abstract public  longlog(String[] targetPaths, long startRevision, long endRevision, boolean changedPath, boolean strictNode, long limit, ISVNLogEntryHandler handler)
     Traverses revisions history.
public  Collectionlog(String[] targetPaths, Collection entries, long startRevision, long endRevision, boolean changedPath, boolean strictNode)
     Traverses revisions history and returns a collection of log entries.
public  voidremoveConnectionListener(ISVNConnectionListener listener)
    
abstract public  voidreplay(long lowRevision, long revision, boolean sendDeltas, ISVNEditor editor)
     Replays the changes from the specified revision through the given editor.

Changes will be limited to those that occur under a session's URL, and the server will assume that the client has no knowledge of revisions prior to a lowRevision.

public  voidsetAuthenticationManager(ISVNAuthenticationManager authManager)
     Sets an authentication driver for this object.
public  voidsetCanceller(ISVNCanceller canceller)
    
public  voidsetDebugLog(ISVNDebugLog log)
     Sets a logger to write debug log information to.
public  voidsetLocation(SVNURL url, boolean forceReconnect)
     Sets a new repository location for this object.
protected  voidsetRepositoryCredentials(String uuid, SVNURL rootURL)
     Caches identification parameters (UUID, rood directory location) of the repository with which this driver is working.
abstract public  voidsetRevisionPropertyValue(long revision, String propertyName, String propertyValue)
     Sets a revision property with the specified name to a new value.
public  voidsetTunnelProvider(ISVNTunnelProvider tunnelProvider)
     Sets a tunnel provider.
abstract public  voidstatus(long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor)
     Gets status of a path.

target is the name (one-level path component) of an entry that will restrict the scope of the status to this entry.

abstract public  voidtestConnection()
     Tries to access a repository.
abstract public  voidunlock(Map pathToTokens, boolean force, ISVNLockHandler handler)
     Removes lock(s) from the file(s).
protected synchronized  voidunlock()
    
abstract public  voidupdate(long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor)
     Updates a path receiving changes from a repository.

target is the name (one-level path component) of an entry that will restrict the scope of the update to this entry.

abstract public  voidupdate(SVNURL url, long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor)
     Updates a path switching it to a new repository location.

Field Detail
myLocation
protected SVNURL myLocation(Code)



myRepositoryRoot
protected SVNURL myRepositoryRoot(Code)



myRepositoryUUID
protected String myRepositoryUUID(Code)




Constructor Detail
SVNRepository
protected SVNRepository(SVNURL location, ISVNSession options)(Code)




Method Detail
addConnectionListener
public void addConnectionListener(ISVNConnectionListener listener)(Code)



assertValidRevision
protected static void assertValidRevision(long revision) throws SVNException(Code)



checkPath
abstract public SVNNodeKind checkPath(String path, long revision) throws SVNException(Code)
Returns the kind of an item located at the specified path in a particular revision. If the path does not exist under the specified revision, org.tmatesoft.svn.core.SVNNodeKind.NONE SVNNodeKind.NONE will be returned.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").
Parameters:
  path - an item's path
Parameters:
  revision - a revision number the node kind for the given path at the given revision
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)




checkout
public void checkout(long revision, String target, boolean recursive, ISVNEditor editor) throws SVNException(Code)
Checks out a directory from a repository .

target is the name (one-level path component) of an entry that will restrict the scope of the checkout to this entry. In other words target is a child entry of the directory represented by the repository location to which this object is set. For example, if we have something like "/dirA/dirB" in a repository, then this object's repository location may be set to "svn://host:port/path/to/repos/dirA", and target may be "dirB".

If target is null or empty ("") then the scope of the checkout operation is the repository location to which this object is set.

The provided editor is used to carry out all the work on building a local tree of dirs and files being checked out.

NOTE: you may not invoke methods of this SVNRepository object from within the provided editor.
Parameters:
  revision - a desired revision of a dir to check out; defaultsto the latest revision (HEAD)
Parameters:
  target - an entry name (optional)
Parameters:
  recursive - if true and the checkout scope is a directory, descends recursively, otherwise not
Parameters:
  editor - a caller's checkout editor
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.update(long,String,boolean,ISVNReporterBaton,ISVNEditor)
See Also:   ISVNEditor



closeSession
abstract public void closeSession()(Code)
Closes the current session closing a socket connection used by this object. If this driver object keeps a single connection for all the data i/o, this method helps to reset the connection.
throws:
  SVNException - if some i/o error has occurred



diff
abstract public void diff(SVNURL url, long targetRevision, long revision, String target, boolean ignoreAncestry, boolean recursive, boolean getContents, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException(Code)
Calculates the differences between two items.

target is the name (one-level path component) of an entry that will restrict the scope of the diff operation to this entry. In other words target is a child entry of the directory represented by the repository location to which this object is set. For example, if we have something like "/dirA/dirB" in a repository, then this object's repository location may be set to "svn://host:port/path/to/repos/dirA", and target may be "dirB".

If target is null or empty ("") then the scope of the diff operation is the repository location to which this object is set.

The reporter is used to describe the state of the target item(s) (i.e. items' revision numbers). All the paths described by the reporter should be relative to the repository location to which this object is set.

After that the editor is used to carry out all the work on evaluating differences against url. This editor contains knowledge of where the change will begin (when ISVNEditor.openRoot(long) ISVNEditor.openRoot() is called).

If ignoreAncestry is false then the ancestry of the paths being diffed is taken into consideration - they are treated as related. In this case, for example, if calculating differences between two files with identical contents but different ancestry, the entire contents of the target file is considered as having been removed and added again.

If ignoreAncestry is true then the two paths are merely compared ignoring the ancestry.

NOTE: you may not invoke methods of this SVNRepository object from within the provided reporter and editor.
Parameters:
  url - a repository location of the entry against which differences are calculated
Parameters:
  targetRevision - a revision number of the entry located at the specified url; defaults to thelatest revision (HEAD) if this arg is invalid
Parameters:
  revision - a revision number of the repository location to which this driver object is set
Parameters:
  target - a target entry name (optional)
Parameters:
  ignoreAncestry - if true thenthe ancestry of the two entries to be diffed is ignored, otherwise not
Parameters:
  recursive - if true and the diff scopeis a directory, descends recursively, otherwise not
Parameters:
  getContents - if false contents (diff windows) will not be sent ot the editor.
Parameters:
  reporter - a caller's reporter
Parameters:
  editor - a caller's editor
throws:
  SVNException - in the following cases:


See Also:   ISVNReporterBaton
See Also:   ISVNReporter
See Also:   ISVNEditor



diff
abstract public void diff(SVNURL url, long targetRevision, long revision, String target, boolean ignoreAncestry, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException(Code)



diff
abstract public void diff(SVNURL url, long revision, String target, boolean ignoreAncestry, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException(Code)
Calculates the differences between two items.

target is the name (one-level path component) of an entry that will restrict the scope of the diff operation to this entry. In other words target is a child entry of the directory represented by the repository location to which this object is set. For example, if we have something like "/dirA/dirB" in a repository, then this object's repository location may be set to "svn://host:port/path/to/repos/dirA", and target may be "dirB".

If target is null or empty ("") then the scope of the diff operation is the repository location to which this object is set.

The reporter is used to describe the state of the target item(s) (i.e. items' revision numbers). All the paths described by the reporter should be relative to the repository location to which this object is set.

After that the editor is used to carry out all the work on evaluating differences against url. This editor contains knowledge of where the change will begin (when ISVNEditor.openRoot(long) ISVNEditor.openRoot() is called).

If ignoreAncestry is false then the ancestry of the paths being diffed is taken into consideration - they are treated as related. In this case, for example, if calculating differences between two files with identical contents but different ancestry, the entire contents of the target file is considered as having been removed and added again.

If ignoreAncestry is true then the two paths are merely compared ignoring the ancestry.

NOTE: you may not invoke methods of this SVNRepository object from within the provided reporter and editor.
Parameters:
  url - a repository location of the entry against which differences are calculated
Parameters:
  revision - a revision number of the repository location to which this driver object is set
Parameters:
  target - a target entry name (optional)
Parameters:
  ignoreAncestry - if true thenthe ancestry of the two entries to be diffed is ignored, otherwise not
Parameters:
  recursive - if true and the diff scopeis a directory, descends recursively, otherwise not
Parameters:
  reporter - a caller's reporter
Parameters:
  editor - a caller's editor
throws:
  SVNException - in the following cases:

SVNRepository.diff(SVNURL,long,long,String,boolean,boolean,ISVNReporterBaton,ISVNEditor)
See Also:   ISVNReporterBaton
See Also:   ISVNReporter
See Also:   ISVNEditor



fireConnectionClosed
protected void fireConnectionClosed()(Code)



fireConnectionOpened
protected void fireConnectionOpened()(Code)



getAuthenticationManager
public ISVNAuthenticationManager getAuthenticationManager()(Code)
Returns the authentication driver registered for this object. an authentication driver that is used by this object to authenticate a user over network



getCanceller
public ISVNCanceller getCanceller()(Code)



getCommitEditor
public ISVNEditor getCommitEditor(String logMessage, ISVNWorkspaceMediator mediator) throws SVNException(Code)
Gets an editor for committing changes to a repository. Having got the editor traverse a local tree of dirs and/or files to be committed, handling them with corresponding methods of the editor.

mediator is used for temporary delta data storage allocations.

The root path of the commit is the current repository location to which this object is set.

After the commit has succeeded ISVNEditor.closeEdit ISVNEditor.closeEdit() returns an SVNCommitInfo object that contains a new revision number, the commit date, commit author.

This method should be rather used with pre-1.2 repositories.

NOTE: you may not invoke methods of this SVNRepository object from within the returned commit editor.
Parameters:
  logMessage - a commit log message
Parameters:
  mediator - temp delta storage provider; used also to cachewcprops while committing an editor to commit a local tree of dirs and/or files
throws:
  SVNException - in the following cases:


See Also:   ISVNEditor
See Also:   ISVNWorkspaceMediator
See Also:    Using ISVNEditor in commit operations



getCommitEditor
abstract public ISVNEditor getCommitEditor(String logMessage, Map locks, boolean keepLocks, ISVNWorkspaceMediator mediator) throws SVNException(Code)
Gets an editor for committing changes to a repository. Having got the editor traverse a local tree of dirs and/or files to be committed, handling them with corresponding methods of the editor.

locks is a map used to provide lock tokens on the locked paths. Keys are locked paths in a local tree, and each value for a key is a lock token. locks must live during the whole commit operation.

If keepLocks is true, then the locked paths won't be unlocked after a successful commit. Otherwise, if false, locks will be automatically released.

mediator is used for temporary delta data storage allocations.

The root path of the commit is the current repository location to which this object is set.

After the commit has succeeded ISVNEditor.closeEdit ISVNEditor.closeEdit() returns an SVNCommitInfo object that contains a new revision number, the commit date, commit author.

NOTE: you may not invoke methods of this SVNRepository object from within the returned commit editor.
Parameters:
  logMessage - a commit log message
Parameters:
  locks - a map containing locked paths mapped to lock tokens
Parameters:
  keepLocks - true to keep existing locks; false to release locks after the commit
Parameters:
  mediator - temp delta storage provider; used also to cachewcprops while committing an editor to commit a local tree of dirs and/or files
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.getCommitEditor(String,ISVNWorkspaceMediator)
See Also:    Using ISVNEditor in commit operations



getDatedRevision
abstract public long getDatedRevision(Date date) throws SVNException(Code)
Returns the recent repository revision number for the particular moment in time - the closest one before or at the specified datestamp.

Example: if you specify a single date without specifying a time of the day (e.g. 2002-11-27) the timestamp is assumed to 00:00:00 and the method won't return any revisions for the day you have specified but for the day just before it.
Parameters:
  date - a datestamp for defining the neededmoment in time the revision of the repositoryfor that time
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)




getDebugLog
public ISVNDebugLog getDebugLog()(Code)
Returns the debug logger currently in use.

If no debug logger has been specified by the time this call occurs, a default one (returned by org.tmatesoft.svn.util.SVNDebugLog.getDefaultLog()) will be created and used. a debug logger




getDir
abstract public long getDir(String path, long revision, Map properties, ISVNDirEntryHandler handler) throws SVNException(Code)
Fetches the contents and/or properties of a directory located at the specified path in a particular revision.

If handler arg is not null it will be dispatched information of each directory entry represented by an SVNDirEntry object.

If properties arg is not null it will receive the properties of the file. This includes all properties: not just ones controlled by a user and stored in the repository filesystem, but also non-tweakable ones (e.g. 'wcprops', 'entryprops', etc.). Property names (keys) are mapped to property values.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

If revision is invalid (negative), HEAD revision will be used. NOTE: you may not invoke operation methods of this SVNRepository object from within the provided handler.
Parameters:
  path - a directory path
Parameters:
  revision - a directory revision
Parameters:
  properties - a directory properties receiver map
Parameters:
  handler - a handler to process directory entries the revision of the directory
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.getDir(String,long,Map,Collection)
See Also:   SVNRepository.getDir(String,long,boolean,Collection)
See Also:   org.tmatesoft.svn.core.SVNDirEntry



getDir
public Collection getDir(String path, long revision, Map properties, Collection dirEntries) throws SVNException(Code)
Fetches the contents and properties of a directory located at the specified path in a particular revision. Information of each directory entry is represented by a single SVNDirEntry object.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").
Parameters:
  path - a directory path
Parameters:
  revision - a revision number
Parameters:
  properties - if not null then alldirectory properties (including non-tweakable ones)will be put into this map (where keys are property namesand mappings are property values)
Parameters:
  dirEntries - if not null then thiscollection receives fetched dir entries (SVNDirEntry objects) a collection containing fetched directory entries (SVNDirEntry objects)
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.getDir(String,long,Map,ISVNDirEntryHandler)
See Also:   SVNRepository.getDir(String,long,boolean,Collection)
See Also:   org.tmatesoft.svn.core.SVNDirEntry



getDir
abstract public SVNDirEntry getDir(String path, long revision, boolean includeCommitMessages, Collection entries) throws SVNException(Code)
Fetches the contents of a directory into the provided collection object and returns the directory entry itself.

If entries arg is not null it receives the directory entries. Information of each directory entry is represented by an SVNDirEntry object.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").
Parameters:
  path - a directory path
Parameters:
  revision - a revision number
Parameters:
  includeCommitMessages - if true thendir entries (SVNDirEntry objects) will be supplied with commit log messages, otherwise not
Parameters:
  entries - a collection that receives fetched dir entries the directory entry itself which contentsare fetched into entries
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.getDir(String,long,Map,ISVNDirEntryHandler)
See Also:   SVNRepository.getDir(String,long,Map,Collection)
See Also:   org.tmatesoft.svn.core.SVNDirEntry



getFile
abstract public long getFile(String path, long revision, Map properties, OutputStream contents) throws SVNException(Code)
Fetches the contents and/or properties of a file located at the specified path in a particular revision.

If contents arg is not null it will be written with file contents.

If properties arg is not null it will receive the properties of the file. This includes all properties: not just ones controlled by a user and stored in the repository filesystem, but also non-tweakable ones (e.g. 'wcprops', 'entryprops', etc.). Property names (keys) are mapped to property values.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

If revision is invalid (negative), HEAD revision will be used.
Parameters:
  path - a file path
Parameters:
  revision - a file revision
Parameters:
  properties - a file properties receiver map
Parameters:
  contents - an output stream to write the file contents to the revision the file has been taken at
throws:
  SVNException - in the following cases:




getFileRevisions
abstract public int getFileRevisions(String path, long startRevision, long endRevision, ISVNFileRevisionHandler handler) throws SVNException(Code)
Retrieves interesting file revisions for the specified file.

A file revision is represented by an SVNFileRevision object. Each file revision is handled by the file revision handler provided. Only those revisions will be retrieved in which the file was changed. The iteration will begin at the first such revision starting from the startRevision and so on - up to the endRevision. If the method succeeds, the provided handler will have been invoked at least once.

For the first interesting revision the file contents will be provided to the handler as a text delta against an empty file. For the following revisions, the delta will be against the fulltext contents of the previous revision.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

NOTES:

  • you may not invoke methods of this SVNRepository object from within the provided handler
  • this functionality is not available in pre-1.1 servers

Parameters:
  path - a file path
Parameters:
  startRevision - a revision to start from
Parameters:
  endRevision - a revision to stop at
Parameters:
  handler - a handler that processes file revisions passed the number of retrieved file revisions
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)
See Also:   SVNRepository.getFileRevisions(String,Collection,long,long)
See Also:   SVNFileRevision
since:
   SVN 1.1



getFileRevisions
public Collection getFileRevisions(String path, Collection revisions, long sRevision, long eRevision) throws SVNException(Code)
Retrieves and returns interesting file revisions for the specified file.

A file revision is represented by an SVNFileRevision object. Only those revisions will be retrieved in which the file was changed. The iteration will begin at the first such revision starting from the startRevision and so on - up to the endRevision.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

NOTE: this functionality is not available in pre-1.1 servers
Parameters:
  path - a file path
Parameters:
  revisions - if not null this collectionwill receive all the fetched file revisions
Parameters:
  sRevision - a revision to start from
Parameters:
  eRevision - a revision to stop at a collection that keeps file revisions - SVNFileRevision instances
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)
See Also:   SVNRepository.getFileRevisions(String,long,long,ISVNFileRevisionHandler)
See Also:   SVNFileRevision
since:
   SVN 1.1




getFullPath
public String getFullPath(String relativeOrRepositoryPath) throws SVNException(Code)
Resolves a path, relative either to the location to which this driver object is set or to the repository root directory, to a path, relative to the host.
Parameters:
  relativeOrRepositoryPath - a relative path within therepository a path relative to the host
throws:
  SVNException -



getLatestRevision
abstract public long getLatestRevision() throws SVNException(Code)
Returns the number of the latest revision of the repository this driver is working with. the latest revision number
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)



getLocation
public SVNURL getLocation()(Code)
Returns the repository location to which this object is set. It may be the location that was used to create this object (see SVNRepositoryFactory.create(SVNURL) ), or the recent one the object was set to. a repository location set for this driver
See Also:   SVNRepository.setLocation(SVNURL,boolean)
See Also:   



getLocations
abstract public int getLocations(String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException(Code)
Gets entry locations in time. The location of an entry in a repository may change from revision to revision. This method allows to trace entry locations in different revisions.

For each interesting revision (taken from revisions) an entry location is represented by an SVNLocationEntry object which is passed to the provided handler. Each SVNLocationEntry object represents a repository path in a definite revision.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

NOTES:

  • you may not invoke methods of this SVNRepository object from within the provided handler
  • this functionality is not available in pre-1.1 servers

Parameters:
  path - an item's path
Parameters:
  pegRevision - a revision in which path is first looked up
Parameters:
  revisions - an array of numbers of interesting revisions in whichlocations are looked up. If path doesn't exist in an interesting revision, that revision will be ignored.
Parameters:
  handler - a location entry handler that will handle all found entrylocations the number of the entry locations found
throws:
  SVNException - in the following cases:
See Also:   SVNRepository.getLocations(String,Collection,long,long[])
See Also:   SVNRepository.getLocations(String,Map,long,long[])
See Also:   
See Also:   ISVNLocationEntryHandler
See Also:   SVNLocationEntry
since:
   SVN 1.1



getLocations
public Collection getLocations(String path, Collection entries, long pegRevision, long[] revisions) throws SVNException(Code)
Gets entry locations in time. The location of an entry in a repository may change from revision to revision. This method allows to trace entry locations in different revisions.

For each interesting revision (taken from revisions) an entry location is represented by an SVNLocationEntry object. Each SVNLocationEntry object represents a repository path in a definite revision.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

NOTE: this functionality is not available in pre-1.1 servers
Parameters:
  path - an item's path
Parameters:
  entries - if not null then this collection object receives entry locations
Parameters:
  pegRevision - a revision in which path is first looked up
Parameters:
  revisions - an array of numbers of interesting revisions in whichlocations are looked up. If path doesn't exist in an interesting revision, that revision will be ignored. a collection with retrieved entry locations
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.getLocations(String,long,long[],ISVNLocationEntryHandler)
See Also:   SVNRepository.getLocations(String,Map,long,long[])
See Also:   SVNLocationEntry
See Also:   ISVNLocationEntryHandler
since:
   SVN 1.1



getLocations
public Map getLocations(String path, Map entries, long pegRevision, long[] revisions) throws SVNException(Code)
Gets entry locations in time. The location of an entry in a repository may change from revision to revision. This method allows to trace entry locations in different revisions.

For each interesting revision (taken from revisions) an entry location is represented by an SVNLocationEntry object. Each SVNLocationEntry object represents a repository path in a definite revision.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

NOTE: this functionality is not available in pre-1.1 servers
Parameters:
  path - an item's path
Parameters:
  entries - if not null then this map object receives entry locations (which keys are revisionnumbers as Longs and mappings are entry locations objects)
Parameters:
  pegRevision - a revision in which path is first looked up
Parameters:
  revisions - an array of numbers of interesting revisions in whichlocations are looked up. If path doesn't exist in an interesting revision, that revision will be ignored. a map (which keys are revision numbers as Longs and mappings are entry locations objects) with collected entry locations
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.getLocations(String,long,long[],ISVNLocationEntryHandler)
See Also:   SVNRepository.getLocations(String,Collection,long,long[])
See Also:   SVNLocationEntry
See Also:   ISVNLocationEntryHandler
since:
   SVN 1.1



getLock
abstract public SVNLock getLock(String path) throws SVNException(Code)
Gets the lock for the file located at the specified path. If the file has no lock the method returns null.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").
Parameters:
  path - a file path an SVNLock instance (representing the lock) or null if there's no lock
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.lock(Map,String,boolean,ISVNLockHandler)
See Also:   SVNRepository.unlock(Map,boolean,ISVNLockHandler)
See Also:   SVNRepository.getLocks(String)
See Also:   org.tmatesoft.svn.core.SVNLock
since:
   SVN 1.2



getLocks
abstract public SVNLock[] getLocks(String path) throws SVNException(Code)
Gets all locks on or below the path, that is if the repository entry (located at the path) is a directory then the method returns locks of all locked files (if any) in it.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").
Parameters:
  path - a path under which locks are to be retrieved an array of SVNLock objects (representing locks)
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.lock(Map,String,boolean,ISVNLockHandler)
See Also:   SVNRepository.unlock(Map,boolean,ISVNLockHandler)
See Also:   SVNRepository.getLock(String)
See Also:   org.tmatesoft.svn.core.SVNLock
since:
   SVN 1.2



getOptions
public ISVNSession getOptions()(Code)
Returns the session options object this driver is using. If no options object was provided to create this driver then it uses a default one - ISVNSession.DEFAULT . a session options object



getRepositoryPath
public String getRepositoryPath(String relativePath) throws SVNException(Code)
Returns a path relative to the repository root directory given a path relative to the location to which this driver object is set.
Parameters:
  relativePath - a path relative to the location to whichthis SVNRepository is set a path relative to the repository root
throws:
  SVNException -



getRepositoryRoot
public SVNURL getRepositoryRoot()(Code)
the repository root directory location url
See Also:   SVNRepository.getRepositoryRoot(boolean)



getRepositoryRoot
public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException(Code)
Gets a repository's root directory location. If this driver object is switched to a different repository location during runtime (probably to an absolutely different repository, see SVNRepository.setLocation(SVNURL,boolean) setLocation() ), the root directory location may be changed.
Parameters:
  forceConnection - if true then forcesthis driver to test a connection - try to access a repository the repository root directory location url
throws:
  SVNException -
See Also:   SVNRepository.testConnection()



getRepositoryUUID
public String getRepositoryUUID()(Code)
the UUID of a repositorySVNRepository.getRepositoryUUID(boolean)



getRepositoryUUID
public String getRepositoryUUID(boolean forceConnection) throws SVNException(Code)
Gets the Universal Unique IDentifier (UUID) of the repository this driver is created for.
Parameters:
  forceConnection - if true then forcesthis driver to test a connection - try to access a repository the UUID of a repository
throws:
  SVNException -



getRevisionObject
protected static Long getRevisionObject(long revision)(Code)



getRevisionProperties
abstract public Map getRevisionProperties(long revision, Map properties) throws SVNException(Code)
Returns unversioned revision properties for a particular revision. Property names (keys) are mapped to their values. You may use SVNRevisionProperty constants to retrieve property values from the map.
Parameters:
  revision - a revision number
Parameters:
  properties - if not null then properties will be placed in this map, otherwise a new map will be created a map containing unversioned revision properties
throws:
  SVNException - in the following cases:
See Also:   org.tmatesoft.svn.core.SVNRevisionProperty



getRevisionPropertyValue
abstract public String getRevisionPropertyValue(long revision, String propertyName) throws SVNException(Code)
Gets the value of an unversioned property.
Parameters:
  revision - a revision number
Parameters:
  propertyName - a property name a revision property value or null if there's no such revision property
throws:
  SVNException - in the following cases:



getTunnelProvider
public ISVNTunnelProvider getTunnelProvider()(Code)
Returns a tunnel provider. a tunnel provider
See Also:   SVNRepository.setTunnelProvider(ISVNTunnelProvider)



info
abstract public SVNDirEntry info(String path, long revision) throws SVNException(Code)
Gives information about an entry located at the specified path in a particular revision.

The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").
Parameters:
  path - an item's path
Parameters:
  revision - a revision of the entry; defaults to the latest revision (HEAD) an SVNDirEntry containing information aboutthe entry or null if there's no entry with at the specified path under the specified revision
throws:
  SVNException - in the following cases:




isInvalidRevision
protected static boolean isInvalidRevision(long revision)(Code)



isValidRevision
protected static boolean isValidRevision(long revision)(Code)



lock
abstract public void lock(Map pathsToRevisions, String comment, boolean force, ISVNLockHandler handler) throws SVNException(Code)
Locks path(s) at definite revision(s).

Note that locking is never anonymous, so any server implementing this function will have to "pull" a username from the client, if it hasn't done so already.

Each path to be locked is handled with the provided handler. If a path was successfully locked, the handler's ISVNLockHandler.handleLock(StringSVNLockSVNErrorMessage) handleLock() is called that receives the path and either a lock object (representing the lock that was set on the path) or an error exception, if locking failed for that path.

If any path is already locked by a different user and the force flag is false, then this call fails with throwing an SVNException. But if force is true, then the existing lock(s) will be "stolen" anyway, even if the user name does not match the current lock's owner.

Paths can be both relative to the location of this driver and absolute to the repository root (starting with "/").
Parameters:
  pathsToRevisions - a map which keys are paths and values are revision numbers (as Longs); paths are strings and revision numbers are Long objects
Parameters:
  comment - a comment string for the lock (optional)
Parameters:
  force - true if the file is to be locked in any way (even if it's already locked by someone else)
Parameters:
  handler - if not null, the lockhandler is invoked on each path to be locked
throws:
  SVNException - in the following cases:

  • force is falseand a path is already locked by someone else
  • a revision of a path is less than its last changed revision
  • a path does not exist in the latest revision
  • a failure occured while connecting to a repository
  • the user authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)

See Also:   SVNRepository.unlock(Map,boolean,ISVNLockHandler)
See Also:   SVNRepository.getLocks(String)
See Also:   SVNRepository.getLock(String)
See Also:   org.tmatesoft.svn.core.SVNLock
since:
   SVN 1.2



lock
protected synchronized void lock()(Code)



lock
protected synchronized void lock(boolean force)(Code)



log
public long log(String[] targetPaths, long startRevision, long endRevision, boolean changedPath, boolean strictNode, ISVNLogEntryHandler handler) throws SVNException(Code)
Traverses revisions history. In other words, collects per revision information that includes the revision number, author, datestamp, log message and maybe a list of changed paths (optional). For each revision this information is represented by an SVNLogEntry object. Such objects are passed to the provided handler.

This method invokes handler on each log entry from startRevision to endRevision. startRevision may be greater or less than endRevision; this just controls whether the log messages are processed in descending or ascending revision number order.

If startRevision or endRevision is invalid, it defaults to the youngest.

If targetPaths has one or more elements, then only those revisions are processed in which at least one of targetPaths was changed (i.e., if a file text or properties changed; if dir properties changed or an entry was added or deleted). Each path is relative to the repository location that this object is set to.

If changedPath is true, then each SVNLogEntry passed to the handler will contain info about all paths changed in that revision it represents. To get them call org.tmatesoft.svn.core.SVNLogEntry.getChangedPaths that returns a map, which keys are the changed paths and the values are SVNLogEntryPath objects. If changedPath is false, changed paths info will not be provided.

If strictNode is true, copy history will not be traversed (if any exists) when harvesting the revision logs for each path.

Target paths can be both relative to the location of this driver and absolute to the repository root (starts with "/").

NOTE: you may not invoke methods of this SVNRepository object from within the provided handler.
Parameters:
  targetPaths - paths that mean only those revisions at which they were changed
Parameters:
  startRevision - a revision to start from
Parameters:
  endRevision - a revision to end at
Parameters:
  changedPath - if true thenrevision information will also include all changed paths per revision, otherwise not
Parameters:
  strictNode - if true then copy history (if any) is not to be traversed
Parameters:
  handler - a caller's handler that will be dispatched log entry objects the number of revisions traversed
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)
See Also:   SVNRepository.log(String[],Collection,long,long,boolean,boolean)
See Also:   SVNRepository.log(String[],long,long,boolean,boolean,long,ISVNLogEntryHandler)
See Also:   org.tmatesoft.svn.core.ISVNLogEntryHandler
See Also:   org.tmatesoft.svn.core.SVNLogEntry
See Also:   org.tmatesoft.svn.core.SVNLogEntryPath




log
abstract public long log(String[] targetPaths, long startRevision, long endRevision, boolean changedPath, boolean strictNode, long limit, ISVNLogEntryHandler handler) throws SVNException(Code)
Traverses revisions history. In other words, collects per revision information that includes the revision number, author, datestamp, log message and maybe a list of changed paths (optional). For each revision this information is represented by an SVNLogEntry object. Such objects are passed to the provided handler.

This method invokes handler on each log entry from startRevision to endRevision. startRevision may be greater or less than endRevision; this just controls whether the log messages are processed in descending or ascending revision number order.

If startRevision or endRevision is invalid, it defaults to the youngest.

If targetPaths has one or more elements, then only those revisions are processed in which at least one of targetPaths was changed (i.e., if a file text or properties changed; if dir properties changed or an entry was added or deleted). Each path is relative to the repository location that this object is set to.

If changedPath is true, then each SVNLogEntry passed to the handler will contain info about all paths changed in that revision it represents. To get them call org.tmatesoft.svn.core.SVNLogEntry.getChangedPaths that returns a map, which keys are the changed paths and the values are SVNLogEntryPath objects. If changedPath is false, changed paths info will not be provided.

If strictNode is true, copy history will not be traversed (if any exists) when harvesting the revision logs for each path.

If limit is > 0 then only the first limit log entries will be handled. Otherwise (i.e. if limit is 0) this number is ignored.

Target paths can be both relative to the location of this driver and absolute to the repository root (starts with "/").

NOTE: you may not invoke methods of this SVNRepository object from within the provided handler.
Parameters:
  targetPaths - paths that mean only those revisions at which they were changed
Parameters:
  startRevision - a revision to start from
Parameters:
  endRevision - a revision to end at
Parameters:
  changedPath - if true thenrevision information will also include all changed paths per revision, otherwise not
Parameters:
  strictNode - if true then copy history (if any) is not to be traversed
Parameters:
  limit - the maximum number of log entries to process
Parameters:
  handler - a caller's handler that will be dispatched log entry objects the number of revisions traversed
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)
See Also:   SVNRepository.log(String[],Collection,long,long,boolean,boolean)
See Also:   SVNRepository.log(String[],long,long,boolean,boolean,long,ISVNLogEntryHandler)
See Also:   org.tmatesoft.svn.core.ISVNLogEntryHandler
See Also:   org.tmatesoft.svn.core.SVNLogEntry
See Also:   org.tmatesoft.svn.core.SVNLogEntryPath




log
public Collection log(String[] targetPaths, Collection entries, long startRevision, long endRevision, boolean changedPath, boolean strictNode) throws SVNException(Code)
Traverses revisions history and returns a collection of log entries. In other words, collects per revision information that includes the revision number, author, datestamp, log message and maybe a list of changed paths (optional). For each revision this information is represented by an SVNLogEntry. object.

startRevision may be greater or less than endRevision; this just controls whether the log messages are processed in descending or ascending revision number order.

If startRevision or endRevision is invalid, it defaults to the youngest.

If targetPaths has one or more elements, then only those revisions are processed in which at least one of targetPaths was changed (i.e., if a file text or properties changed; if dir properties changed or an entry was added or deleted). Each path is relative to the repository location that this object is set to.

If changedPath is true, then each SVNLogEntry object is supplied with info about all paths changed in that revision it represents. To get them call org.tmatesoft.svn.core.SVNLogEntry.getChangedPaths that returns a map, which keys are the changed paths and the mappings are SVNLogEntryPath objects. If changedPath is false, changed paths info will not be provided.

If strictNode is true, copy history will not be traversed (if any exists) when harvesting the revision logs for each path.

Target paths can be both relative to the location of this driver and absolute to the repository root (starts with "/").
Parameters:
  targetPaths - paths that mean only those revisions at which they were changed
Parameters:
  entries - if not null then this collectionwill receive log entries
Parameters:
  startRevision - a revision to start from
Parameters:
  endRevision - a revision to end at
Parameters:
  changedPath - if true thenrevision information will also include all changed paths per revision, otherwise not
Parameters:
  strictNode - if true then copy history (if any) is not to be traversed a collection with log entries
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)
See Also:   SVNRepository.log(String[],long,long,boolean,boolean,ISVNLogEntryHandler)
See Also:   SVNRepository.log(String[],long,long,boolean,boolean,long,ISVNLogEntryHandler)
See Also:   org.tmatesoft.svn.core.ISVNLogEntryHandler
See Also:   org.tmatesoft.svn.core.SVNLogEntry
See Also:   org.tmatesoft.svn.core.SVNLogEntryPath




removeConnectionListener
public void removeConnectionListener(ISVNConnectionListener listener)(Code)



replay
abstract public void replay(long lowRevision, long revision, boolean sendDeltas, ISVNEditor editor) throws SVNException(Code)
Replays the changes from the specified revision through the given editor.

Changes will be limited to those that occur under a session's URL, and the server will assume that the client has no knowledge of revisions prior to a lowRevision. These two limiting factors define the portion of the tree that the server will assume the client already has knowledge of, and thus any copies of data from outside that part of the tree will be sent in their entirety, not as simple copies or deltas against a previous version.

If sendDeltas is null, the actual text and property changes in the revision will be sent, otherwise no text deltas and null property changes will be sent instead.

If lowRevision is invalid, it defaults to 0.
Parameters:
  lowRevision - a low revision point beyond which a client has noknowledge of paths history
Parameters:
  revision - a revision to replay
Parameters:
  sendDeltas - controls whether text and property changes are to besent
Parameters:
  editor - a commit editor to receive changes
throws:
  SVNException -
since:
   1.1, new in SVN 1.4




setAuthenticationManager
public void setAuthenticationManager(ISVNAuthenticationManager authManager)(Code)
Sets an authentication driver for this object. The auth driver may be implemented to retrieve cached credentials, to prompt a user for credentials or something else (actually, this is up to an implementor). Also there's a default implementation - see the org.tmatesoft.svn.core.wc.SVNWCUtil class for more details.
Parameters:
  authManager - an authentication driver to provide user credentials
See Also:   SVNRepository.getAuthenticationManager()



setCanceller
public void setCanceller(ISVNCanceller canceller)(Code)



setDebugLog
public void setDebugLog(ISVNDebugLog log)(Code)
Sets a logger to write debug log information to.
Parameters:
  log - a debug logger



setLocation
public void setLocation(SVNURL url, boolean forceReconnect) throws SVNException(Code)
Sets a new repository location for this object. The ability to reset an old repository location to a new one (to switch the working location) lets a developer to use the same SVNRepository object instead of creating a new object per each repository location. This advantage gives memory & coding efforts economy.

But you can not specify a new repository location url with a protocol different from the one used for the previous (essentially, the current) repository location, since SVNRepository objects are protocol dependent.

If a new url is located within the same repository, this object just switches to that url not closing the current session (i.e. not calling SVNRepository.closeSession() ).

If either a new url refers to the same host (including a port number), or refers to an absolutely different host, or this object has got no repository root location cached (hasn't ever accessed a repository yet), or forceReconnect is true, then the current session is closed, cached repository credentials (UUID and repository root directory location ) are reset and this object is switched to a new repository location.
Parameters:
  url - a new repository location url
Parameters:
  forceReconnect - if true thenforces to close the current session, resets thecached repository credentials and switches this object to a new location (doesn't matter whether it's on the same host or not)
throws:
  SVNException - if the old url and a new one has got differentprotocols




setRepositoryCredentials
protected void setRepositoryCredentials(String uuid, SVNURL rootURL)(Code)
Caches identification parameters (UUID, rood directory location) of the repository with which this driver is working.
Parameters:
  uuid - the repository's Universal Unique IDentifier (UUID)
Parameters:
  rootURL - the repository's root directory location
See Also:   SVNRepository.getRepositoryRoot(boolean)
See Also:   SVNRepository.getRepositoryUUID(boolean)



setRevisionPropertyValue
abstract public void setRevisionPropertyValue(long revision, String propertyName, String propertyValue) throws SVNException(Code)
Sets a revision property with the specified name to a new value.

NOTE: revision properties are not versioned. So, the old values may be lost forever.
Parameters:
  revision - the number of the revision which property is tobe changed
Parameters:
  propertyName - a revision property name
Parameters:
  propertyValue - the value of the revision property
throws:
  SVNException - in the following cases:

  • the repository is configured not to allow clientsto modify revision properties (e.g. a pre-revprop-change-hookprogram is not found or failed)
  • revision is invalid or doesn't exist at all
  • a failure occured while connecting to a repository
  • the user authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)

See Also:   org.tmatesoft.svn.core.SVNRevisionProperty



setTunnelProvider
public void setTunnelProvider(ISVNTunnelProvider tunnelProvider)(Code)
Sets a tunnel provider. Actually relevant only to svn+xxx:// scheme cases. The provider is responsible for matching xxx to the tunnel command string.

If one would like to have a standard Subversion behaviour (when tunnel commands are fetched from the config file beneath the section named tunnels), he should provide a default provider (default implementation of the org.tmatesoft.svn.core.wc.ISVNOptions interface). Refer to org.tmatesoft.svn.core.wc.SVNWCUtil class for more details on how to get a default options driver.
Parameters:
  tunnelProvider - a tunnel provider
See Also:   SVNRepository.getTunnelProvider()




status
abstract public void status(long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException(Code)
Gets status of a path.

target is the name (one-level path component) of an entry that will restrict the scope of the status to this entry. In other words target is a child entry of the directory represented by the repository location to which this object is set. For example, if we have something like "/dirA/dirB" in a repository, then this object's repository location may be set to "svn://host:port/path/to/repos/dirA", and target may be "dirB".

If target is null or empty ("") then the scope of the update operation is the repository location to which this object is set.

The reporter is used to describe the state of the local item(s) (i.e. items' revision numbers, deleted, switched items). All the paths described by the reporter should be relative to the repository location to which this object is set.

After that the editor is used to carry out all the work on performing status. This editor contains knowledge of where the change will begin (when ISVNEditor.openRoot(long) ISVNEditor.openRoot() is called).

NOTE: you may not invoke methods of this SVNRepository object from within the provided reporter and editor.
Parameters:
  revision - a desired revision to get status against; defaults tothe latest revision (HEAD)
Parameters:
  target - an entry name (optional)
Parameters:
  recursive - if true and the status scopeis a directory, descends recursively, otherwise not
Parameters:
  reporter - a client's reporter-baton
Parameters:
  editor - a client's status editor
throws:
  SVNException - in the following cases:


See Also:   ISVNReporterBaton
See Also:   ISVNEditor



testConnection
abstract public void testConnection() throws SVNException(Code)
Tries to access a repository. Used to check if there're no problems with accessing a repository and to cache a repository UUID and root directory location.
throws:
  SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)



unlock
abstract public void unlock(Map pathToTokens, boolean force, ISVNLockHandler handler) throws SVNException(Code)
Removes lock(s) from the file(s).

Note that unlocking is never anonymous, so any server implementing this function will have to "pull" a username from the client, if it hasn't done so already.

Each path to be unlocked is handled with the provided handler. If a path was successfully unlocked, the handler's ISVNLockHandler.handleUnlock(StringSVNLockSVNErrorMessage) handleUnlock() is called that receives the path and either a lock object (representing the lock that was removed from the path) or an error exception, if unlocking failed for that path.

If the username doesn't match the lock's owner and force is false, this method call fails with throwing an SVNException. But if the force flag is true, the lock will be "broken" by the current user.

Also if the lock token is incorrect or null and force is false, the method fails with throwing a SVNException. However, if force is true the lock will be removed anyway.

Paths can be both relative to the location of this driver and absolute to the repository root (starting with "/").
Parameters:
  pathToTokens - a map which keys are file paths and values are file locktokens (both keys and values are strings)
Parameters:
  force - true to remove the lock in any case - i.e. to "break" the lock
Parameters:
  handler - if not null, the lockhandler is invoked on each path to be unlocked
throws:
  SVNException - in the following cases:

  • force is falseand the name of the user who tries to unlock a path does not matchthe lock owner
  • a lock token is incorrect for a path
  • a failure occurred while connecting to a repository
  • the user authentication failed (see org.tmatesoft.svn.core.SVNAuthenticationException)

See Also:   SVNRepository.lock(Map,String,boolean,ISVNLockHandler)
See Also:   SVNRepository.getLocks(String)
See Also:   SVNRepository.getLock(String)
See Also:   org.tmatesoft.svn.core.SVNLock
since:
   SVN 1.2



unlock
protected synchronized void unlock()(Code)



update
abstract public void update(long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException(Code)
Updates a path receiving changes from a repository.

target is the name (one-level path component) of an entry that will restrict the scope of the update to this entry. In other words target is a child entry of the directory represented by the repository location to which this object is set. For example, if we have something like "/dirA/dirB" in a repository, then this object's repository location may be set to "svn://host:port/path/to/repos/dirA", and target may be "dirB".

If target is null or empty ("") then the scope of the update operation is the repository location to which this object is set.

The reporter is used to describe the state of the local item(s) (i.e. items' revision numbers, deleted, switched items). All the paths described by the reporter should be relative to the repository location to which this object is set.

After that the editor is used to carry out all the work on updating. This editor contains knowledge of where the change will begin (when ISVNEditor.openRoot(long) ISVNEditor.openRoot() is called).

NOTE: you may not invoke methods of this SVNRepository object from within the provided reporter and editor.
Parameters:
  revision - a desired revision to make update to; defaults tothe latest revision (HEAD)
Parameters:
  target - an entry name (optional)
Parameters:
  recursive - if true and the update scopeis a directory, descends recursively, otherwise not
Parameters:
  reporter - a caller's reporter
Parameters:
  editor - a caller's editor
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.update(SVNURL,long,String,boolean,ISVNReporterBaton,ISVNEditor)
See Also:   ISVNReporterBaton
See Also:   ISVNReporter
See Also:   ISVNEditor
See Also:    Using ISVNReporter/ISVNEditor in update-related operations



update
abstract public void update(SVNURL url, long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException(Code)
Updates a path switching it to a new repository location.

Updates a path as it's described for the SVNRepository.update(long,String,boolean,ISVNReporterBaton,ISVNEditor) update() method using the provided reporter and editor, and switching it to a new repository location.

NOTE: you may not invoke methods of this SVNRepository object from within the provided reporter and editor.
Parameters:
  url - a new location in the repository to switch to
Parameters:
  revision - a desired revision to make update to; defaultsto the latest revision (HEAD)
Parameters:
  target - an entry name (optional)
Parameters:
  recursive - if true and the switch scopeis a directory, descends recursively, otherwise not
Parameters:
  reporter - a caller's reporter
Parameters:
  editor - a caller's editor
throws:
  SVNException - in the following cases:


See Also:   SVNRepository.update(long,String,boolean,ISVNReporterBaton,ISVNEditor)
See Also:   ISVNReporterBaton
See Also:   ISVNReporter
See Also:   ISVNEditor
See Also:    Using ISVNReporter/ISVNEditor in update-related operations



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.