org.tmatesoft.svn.core.wc

Class SVNBasicClient

Implemented Interfaces:
ISVNEventHandler
Known Direct Subclasses:
SVNAdminClient, SVNCommitClient, SVNCopyClient, SVNDiffClient, SVNLogClient, SVNLookClient, SVNMoveClient, SVNStatusClient, SVNUpdateClient, SVNWCClient

public class SVNBasicClient
extends Object
implements ISVNEventHandler

The SVNBasicClient is the base class of all SVN*Client classes that provides a common interface and realization.

All of SVN*Client classes use inherited methods of SVNBasicClient to access Working Copies metadata, to create a driver object to access a repository if it's necessary, etc. In addition SVNBasicClient provides some interface methods - such as those that allow you to set your event handler, obtain run-time configuration options, and others.

Version:
1.1.1
Author:
TMate Software Ltd.

Nested Class Summary

protected static class
SVNBasicClient.RepositoryReference
protected static class
SVNBasicClient.SVNRepositoryLocation

Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler

UNKNOWN

Constructor Summary

SVNBasicClient(ISVNAuthenticationManager authManager, ISVNOptions options)
SVNBasicClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)

Method Summary

void
checkCancelled()
Redirects this call to the registered event handler (if any).
protected SVNRepository
createRepository(SVNURL url, File path, SVNRevision pegRevision, SVNRevision revision)
protected SVNRepository
createRepository(SVNURL url, File path, SVNRevision pegRevision, SVNRevision revision, long[] pegRev)
protected SVNRepository
createRepository(SVNURL url, boolean mayReuse)
protected org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess
createWCAccess()
protected org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess
createWCAccess(String pathPrefix)
protected void
dispatchEvent(SVNEvent event)
protected void
dispatchEvent(SVNEvent event, double progress)
org.tmatesoft.svn.util.ISVNDebugLog
getDebugLog()
Returns the debug logger currently in use.
protected ISVNEventHandler
getEventDispatcher()
protected SVNBasicClient.SVNRepositoryLocation[]
getLocations(SVNURL url, File path, SVNRepository repository, SVNRevision revision, SVNRevision start, SVNRevision end)
ISVNOptions
getOptions()
Gets a run-time configuration area driver used by this object.
protected ISVNRepositoryPool
getRepositoryPool()
protected long
getRevisionNumber(SVNRevision revision, SVNRepository repository, File path)
protected SVNURL
getURL(File path)
void
handleEvent(SVNEvent event, double progress)
Dispatches events to the registered event handler (if any).
boolean
isIgnoreExternals()
Determines if externals definitions are ignored.
boolean
isLeaveConflictsUnresolved()
Determines if conflicted files should be left unresolved preventing from merging their contents during update and merge operations.
void
setDebugLog(org.tmatesoft.svn.util.ISVNDebugLog log)
Sets a logger to write debug log information to.
void
setEventHandler(ISVNEventHandler dispatcher)
Sets an event handler for this object.
void
setEventPathPrefix(String prefix)
Removes or adds a path prefix.
void
setIgnoreExternals(boolean ignore)
Sets externals definitions to be ignored or not during operations.
void
setLeaveConflictsUnresolved(boolean leave)
Sets (or unsets) all conflicted working files to be untouched by update and merge operations.
protected void
sleepForTimeStamp()

Constructor Details

SVNBasicClient

protected SVNBasicClient(ISVNAuthenticationManager authManager,
                         ISVNOptions options)

SVNBasicClient

protected SVNBasicClient(ISVNRepositoryPool repositoryPool,
                         ISVNOptions options)

Method Details

checkCancelled

public void checkCancelled()
            throws SVNCancelException
Redirects this call to the registered event handler (if any).
Specified by:
checkCancelled in interface ISVNEventHandler
Throws:
SVNCancelException - if the current operation was cancelled

createRepository

protected SVNRepository createRepository(SVNURL url,
                                         File path,
                                         SVNRevision pegRevision,
                                         SVNRevision revision)
            throws SVNException

createRepository

protected SVNRepository createRepository(SVNURL url,
                                         File path,
                                         SVNRevision pegRevision,
                                         SVNRevision revision,
                                         long[] pegRev)
            throws SVNException

createRepository

protected SVNRepository createRepository(SVNURL url,
                                         boolean mayReuse)
            throws SVNException

createWCAccess

protected org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess createWCAccess()

createWCAccess

protected org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess createWCAccess(String pathPrefix)

dispatchEvent

protected void dispatchEvent(SVNEvent event)
            throws SVNException

dispatchEvent

protected void dispatchEvent(SVNEvent event,
                             double progress)
            throws SVNException

getDebugLog

public org.tmatesoft.svn.util.ISVNDebugLog getDebugLog()
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.

Returns:
a debug logger

getEventDispatcher

protected ISVNEventHandler getEventDispatcher()

getLocations

protected SVNBasicClient.SVNRepositoryLocation[] getLocations(SVNURL url,
                                                              File path,
                                                              SVNRepository repository,
                                                              SVNRevision revision,
                                                              SVNRevision start,
                                                              SVNRevision end)
            throws SVNException

getOptions

public ISVNOptions getOptions()
Gets a run-time configuration area driver used by this object.
Returns:
the run-time options driver being in use

getRepositoryPool

protected ISVNRepositoryPool getRepositoryPool()

getRevisionNumber

protected long getRevisionNumber(SVNRevision revision,
                                 SVNRepository repository,
                                 File path)
            throws SVNException

getURL

protected SVNURL getURL(File path)
            throws SVNException

handleEvent

public void handleEvent(SVNEvent event,
                        double progress)
            throws SVNException
Dispatches events to the registered event handler (if any).
Specified by:
handleEvent in interface ISVNEventHandler
Parameters:
event - the current event
progress - progress state (from 0 to 1)
Throws:
SVNException -

isIgnoreExternals

public boolean isIgnoreExternals()
Determines if externals definitions are ignored.
Returns:
true if ignored, otherwise false

isLeaveConflictsUnresolved

public boolean isLeaveConflictsUnresolved()
Determines if conflicted files should be left unresolved preventing from merging their contents during update and merge operations.
Returns:
true if conflicted files are set to be prevented from merging, false if there's no such restriction

setDebugLog

public void setDebugLog(org.tmatesoft.svn.util.ISVNDebugLog log)
Sets a logger to write debug log information to.
Parameters:
log - a debug logger

setEventHandler

public void setEventHandler(ISVNEventHandler dispatcher)
Sets an event handler for this object. This event handler will be dispatched SVNEvent objects to provide detailed information about actions and progress state of version control operations performed by do*() methods of SVN*Client classes.
Parameters:
dispatcher - an event handler

setEventPathPrefix

public void setEventPathPrefix(String prefix)
Removes or adds a path prefix. This method is not intended for users (from an API point of view).
Parameters:
prefix - a path prefix

setIgnoreExternals

public void setIgnoreExternals(boolean ignore)
Sets externals definitions to be ignored or not during operations.

For example, if external definitions are set to be ignored then a checkout operation won't fetch them into a Working Copy.

Parameters:
ignore - true to ignore externals definitions, false - not to

setLeaveConflictsUnresolved

public void setLeaveConflictsUnresolved(boolean leave)
Parameters:
leave - true to prevent conflicted files from merging (all merging operations will be skipped), otherwise false

sleepForTimeStamp

protected void sleepForTimeStamp()

Copyright © 2004-2006 TMate Software Ltd. All Rights Reserved.