Class SVNWCAccess
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess
-
- All Implemented Interfaces:
ISVNCanceller
,ISVNEventHandler
public class SVNWCAccess extends java.lang.Object implements ISVNEventHandler
- Version:
- 1.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SVNWCAccess.TCEntryHandler
-
Field Summary
Fields Modifier and Type Field Description static int
INFINITE_DEPTH
private java.util.Map
myAdminAreas
private java.io.File
myAnchor
private java.util.Map
myCleanupHandlers
private ISVNEventHandler
myEventHandler
private SVNObjectsPool
myObjectsPool
private ISVNOptions
myOptions
private static boolean
ourNeverDescendIntoSymlinks
-
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL
-
Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler
UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SVNWCAccess(ISVNEventHandler handler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkCancelled()
Checks if the current operation is cancelled (somehow interrupted) and should throw an SVNCancelException or notify the handler if exists.void
close()
void
closeAdminArea(java.io.File path)
SVNMergeCallback
createMergeCallback(SVNMergeDriver mergeDriver, SVNAdminArea adminArea, SVNURL url, SVNDiffOptions mergeOptions, java.util.Map conflictedPaths, boolean force, boolean dryRun)
ISVNUpdateEditor
createUpdateEditor(SVNAdminAreaInfo info, java.lang.String switchURL, boolean allowUnversionedObstructions, boolean depthIsSticky, SVNDepth depth, java.lang.String[] preservedExtensions, ISVNFileFetcher fileFetcher, boolean lockOnDemand)
private void
doClose(java.util.Map adminAreas, boolean preserveLocks)
private void
doClose(SVNAdminArea adminArea, boolean preserveLocks)
private SVNAdminArea
doOpen(java.io.File path, boolean writeLock, boolean stealLock, boolean upgradeFormat, int depth, java.util.Map tmp, java.util.logging.Level logLevel)
SVNAdminArea
getAdminArea(java.io.File path)
SVNAdminArea[]
getAdminAreas()
java.io.File
getAnchor()
SVNEntry
getEntry(java.io.File path, boolean showHidden)
ISVNEventHandler
getEventHandler()
(package private) int
getMaxFormatVersion()
SVNObjectsPool
getObjectsPool()
ISVNOptions
getOptions()
SVNTreeConflictDescription
getTreeConflict(java.io.File path)
SVNEntry
getVersionedEntry(java.io.File path, boolean showHidden)
void
handleEvent(SVNEvent event)
void
handleEvent(SVNEvent event, double progress)
Handles the current event.boolean
hasTreeConflict(java.io.File path)
boolean
isLocked(java.io.File path)
boolean
isMissing(java.io.File path)
private static boolean
isObjectsPoolEnabled()
boolean
isWCRoot(java.io.File path)
static boolean
matchesChangeList(java.util.Collection changeLists, SVNEntry entry)
static SVNWCAccess
newInstance(ISVNEventHandler eventHandler)
SVNAdminArea
open(java.io.File path, boolean writeLock, boolean stealLock, boolean upgradeFormat, int depth, java.util.logging.Level logLevel)
SVNAdminArea
open(java.io.File path, boolean writeLock, boolean stealLock, int depth)
SVNAdminArea
open(java.io.File path, boolean writeLock, int depth)
SVNAdminAreaInfo
openAnchor(java.io.File path, boolean writeLock, int depth)
private java.io.File
probe(java.io.File path, java.util.logging.Level logLevel)
SVNAdminArea
probeOpen(java.io.File path, boolean writeLock, int depth)
SVNAdminArea
probeOpen(java.io.File path, boolean writeLock, int depth, java.util.logging.Level logLevel)
SVNAdminArea
probeRetrieve(java.io.File path)
SVNAdminArea
probeTry(java.io.File path, boolean writeLock, int depth)
void
registerCleanupHandler(SVNAdminArea area, ISVNCleanupHandler handler)
SVNAdminArea
retrieve(java.io.File path)
void
setAnchor(java.io.File anchor)
void
setEventHandler(ISVNEventHandler handler)
void
setOptions(ISVNOptions options)
void
setRepositoryRoot(java.io.File path, SVNURL reposRoot)
SVNAdminArea
upgrade(java.io.File path)
Ugrades SVNAdminArea associated with the path and cached in this SVNWCAccess instance.void
walkEntries(java.io.File path, ISVNEntryHandler handler, boolean showHidden, boolean includeTC, SVNDepth depth)
void
walkEntries(java.io.File path, ISVNEntryHandler handler, boolean showHidden, SVNDepth depth)
-
-
-
Field Detail
-
INFINITE_DEPTH
public static final int INFINITE_DEPTH
- See Also:
- Constant Field Values
-
myEventHandler
private ISVNEventHandler myEventHandler
-
myOptions
private ISVNOptions myOptions
-
myAdminAreas
private java.util.Map myAdminAreas
-
myCleanupHandlers
private java.util.Map myCleanupHandlers
-
myObjectsPool
private SVNObjectsPool myObjectsPool
-
myAnchor
private java.io.File myAnchor
-
ourNeverDescendIntoSymlinks
private static boolean ourNeverDescendIntoSymlinks
-
-
Constructor Detail
-
SVNWCAccess
private SVNWCAccess(ISVNEventHandler handler)
-
-
Method Detail
-
newInstance
public static SVNWCAccess newInstance(ISVNEventHandler eventHandler)
-
isObjectsPoolEnabled
private static boolean isObjectsPoolEnabled()
-
setEventHandler
public void setEventHandler(ISVNEventHandler handler)
-
getEventHandler
public ISVNEventHandler getEventHandler()
-
checkCancelled
public void checkCancelled() throws SVNCancelException
Description copied from interface:ISVNCanceller
Checks if the current operation is cancelled (somehow interrupted) and should throw an SVNCancelException or notify the handler if exists. This method is often called during iterations when processing trees of versioned items. This way the entire operation may be interrupted without waiting till the iteration run out.- Specified by:
checkCancelled
in interfaceISVNCanceller
- Throws:
SVNCancelException
-
handleEvent
public void handleEvent(SVNEvent event) throws SVNException
- Throws:
SVNException
-
registerCleanupHandler
public void registerCleanupHandler(SVNAdminArea area, ISVNCleanupHandler handler)
-
handleEvent
public void handleEvent(SVNEvent event, double progress) throws SVNException
Description copied from interface:ISVNEventHandler
Handles the current event.Generally all operations represented by do*() methods of SVN*Client objects are followed by generating a sequence of events that are passed to the registered ISVNEventHandler object for custom processing. For example, during an update operation each local item being modified is signaled about by dispatching a specific for this item SVNEvent object to this method where this event can be scrutinized and handled in a desired way.
- Specified by:
handleEvent
in interfaceISVNEventHandler
- Parameters:
event
- the current event that keeps detailed information on the type of action occured and other attributes like path, status, etc.progress
- currently reserved for future use; now it's value is always set toISVNEventHandler.UNKNOWN
- Throws:
SVNException
-
setOptions
public void setOptions(ISVNOptions options)
-
getOptions
public ISVNOptions getOptions()
-
setAnchor
public void setAnchor(java.io.File anchor)
-
getAnchor
public java.io.File getAnchor()
-
openAnchor
public SVNAdminAreaInfo openAnchor(java.io.File path, boolean writeLock, int depth) throws SVNException
- Throws:
SVNException
-
open
public SVNAdminArea open(java.io.File path, boolean writeLock, int depth) throws SVNException
- Throws:
SVNException
-
open
public SVNAdminArea open(java.io.File path, boolean writeLock, boolean stealLock, int depth) throws SVNException
- Throws:
SVNException
-
open
public SVNAdminArea open(java.io.File path, boolean writeLock, boolean stealLock, boolean upgradeFormat, int depth, java.util.logging.Level logLevel) throws SVNException
- Throws:
SVNException
-
probeOpen
public SVNAdminArea probeOpen(java.io.File path, boolean writeLock, int depth) throws SVNException
- Throws:
SVNException
-
probeOpen
public SVNAdminArea probeOpen(java.io.File path, boolean writeLock, int depth, java.util.logging.Level logLevel) throws SVNException
- Throws:
SVNException
-
probeTry
public SVNAdminArea probeTry(java.io.File path, boolean writeLock, int depth) throws SVNException
- Throws:
SVNException
-
close
public void close() throws SVNException
- Throws:
SVNException
-
closeAdminArea
public void closeAdminArea(java.io.File path) throws SVNException
- Throws:
SVNException
-
doOpen
private SVNAdminArea doOpen(java.io.File path, boolean writeLock, boolean stealLock, boolean upgradeFormat, int depth, java.util.Map tmp, java.util.logging.Level logLevel) throws SVNException
- Throws:
SVNException
-
doClose
private void doClose(java.util.Map adminAreas, boolean preserveLocks) throws SVNException
- Throws:
SVNException
-
doClose
private void doClose(SVNAdminArea adminArea, boolean preserveLocks) throws SVNException
- Throws:
SVNException
-
probeRetrieve
public SVNAdminArea probeRetrieve(java.io.File path) throws SVNException
- Throws:
SVNException
-
isMissing
public boolean isMissing(java.io.File path)
-
isLocked
public boolean isLocked(java.io.File path) throws SVNException
- Throws:
SVNException
-
isWCRoot
public boolean isWCRoot(java.io.File path) throws SVNException
- Throws:
SVNException
-
getTreeConflict
public SVNTreeConflictDescription getTreeConflict(java.io.File path) throws SVNException
- Throws:
SVNException
-
hasTreeConflict
public boolean hasTreeConflict(java.io.File path) throws SVNException
- Throws:
SVNException
-
getEntry
public SVNEntry getEntry(java.io.File path, boolean showHidden) throws SVNException
- Throws:
SVNException
-
getVersionedEntry
public SVNEntry getVersionedEntry(java.io.File path, boolean showHidden) throws SVNException
- Throws:
SVNException
-
setRepositoryRoot
public void setRepositoryRoot(java.io.File path, SVNURL reposRoot) throws SVNException
- Throws:
SVNException
-
getAdminAreas
public SVNAdminArea[] getAdminAreas()
-
upgrade
public SVNAdminArea upgrade(java.io.File path) throws SVNException
Ugrades SVNAdminArea associated with the path and cached in this SVNWCAccess instance. Updates caches if upgrade was done.- Parameters:
path
- path associated with already retrieved and locked SVNAdminArea- Returns:
- newly created SVNAdminArea object if upgrade was done or already cached SVNAdminArea instance otherwise.
- Throws:
SVNException
-
retrieve
public SVNAdminArea retrieve(java.io.File path) throws SVNException
- Throws:
SVNException
-
getAdminArea
public SVNAdminArea getAdminArea(java.io.File path)
-
walkEntries
public void walkEntries(java.io.File path, ISVNEntryHandler handler, boolean showHidden, SVNDepth depth) throws SVNException
- Throws:
SVNException
-
walkEntries
public void walkEntries(java.io.File path, ISVNEntryHandler handler, boolean showHidden, boolean includeTC, SVNDepth depth) throws SVNException
- Throws:
SVNException
-
probe
private java.io.File probe(java.io.File path, java.util.logging.Level logLevel) throws SVNException
- Throws:
SVNException
-
matchesChangeList
public static boolean matchesChangeList(java.util.Collection changeLists, SVNEntry entry)
-
getMaxFormatVersion
int getMaxFormatVersion()
-
createUpdateEditor
public ISVNUpdateEditor createUpdateEditor(SVNAdminAreaInfo info, java.lang.String switchURL, boolean allowUnversionedObstructions, boolean depthIsSticky, SVNDepth depth, java.lang.String[] preservedExtensions, ISVNFileFetcher fileFetcher, boolean lockOnDemand) throws SVNException
- Throws:
SVNException
-
createMergeCallback
public SVNMergeCallback createMergeCallback(SVNMergeDriver mergeDriver, SVNAdminArea adminArea, SVNURL url, SVNDiffOptions mergeOptions, java.util.Map conflictedPaths, boolean force, boolean dryRun)
-
getObjectsPool
public SVNObjectsPool getObjectsPool()
-
-