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 classSVNWCAccess.TCEntryHandler
-
Field Summary
Fields Modifier and Type Field Description static intINFINITE_DEPTHprivate java.util.MapmyAdminAreasprivate java.io.FilemyAnchorprivate java.util.MapmyCleanupHandlersprivate ISVNEventHandlermyEventHandlerprivate SVNObjectsPoolmyObjectsPoolprivate ISVNOptionsmyOptionsprivate static booleanourNeverDescendIntoSymlinks-
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 privateSVNWCAccess(ISVNEventHandler handler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckCancelled()Checks if the current operation is cancelled (somehow interrupted) and should throw an SVNCancelException or notify the handler if exists.voidclose()voidcloseAdminArea(java.io.File path)SVNMergeCallbackcreateMergeCallback(SVNMergeDriver mergeDriver, SVNAdminArea adminArea, SVNURL url, SVNDiffOptions mergeOptions, java.util.Map conflictedPaths, boolean force, boolean dryRun)ISVNUpdateEditorcreateUpdateEditor(SVNAdminAreaInfo info, java.lang.String switchURL, boolean allowUnversionedObstructions, boolean depthIsSticky, SVNDepth depth, java.lang.String[] preservedExtensions, ISVNFileFetcher fileFetcher, boolean lockOnDemand)private voiddoClose(java.util.Map adminAreas, boolean preserveLocks)private voiddoClose(SVNAdminArea adminArea, boolean preserveLocks)private SVNAdminAreadoOpen(java.io.File path, boolean writeLock, boolean stealLock, boolean upgradeFormat, int depth, java.util.Map tmp, java.util.logging.Level logLevel)SVNAdminAreagetAdminArea(java.io.File path)SVNAdminArea[]getAdminAreas()java.io.FilegetAnchor()SVNEntrygetEntry(java.io.File path, boolean showHidden)ISVNEventHandlergetEventHandler()(package private) intgetMaxFormatVersion()SVNObjectsPoolgetObjectsPool()ISVNOptionsgetOptions()SVNTreeConflictDescriptiongetTreeConflict(java.io.File path)SVNEntrygetVersionedEntry(java.io.File path, boolean showHidden)voidhandleEvent(SVNEvent event)voidhandleEvent(SVNEvent event, double progress)Handles the current event.booleanhasTreeConflict(java.io.File path)booleanisLocked(java.io.File path)booleanisMissing(java.io.File path)private static booleanisObjectsPoolEnabled()booleanisWCRoot(java.io.File path)static booleanmatchesChangeList(java.util.Collection changeLists, SVNEntry entry)static SVNWCAccessnewInstance(ISVNEventHandler eventHandler)SVNAdminAreaopen(java.io.File path, boolean writeLock, boolean stealLock, boolean upgradeFormat, int depth, java.util.logging.Level logLevel)SVNAdminAreaopen(java.io.File path, boolean writeLock, boolean stealLock, int depth)SVNAdminAreaopen(java.io.File path, boolean writeLock, int depth)SVNAdminAreaInfoopenAnchor(java.io.File path, boolean writeLock, int depth)private java.io.Fileprobe(java.io.File path, java.util.logging.Level logLevel)SVNAdminAreaprobeOpen(java.io.File path, boolean writeLock, int depth)SVNAdminAreaprobeOpen(java.io.File path, boolean writeLock, int depth, java.util.logging.Level logLevel)SVNAdminAreaprobeRetrieve(java.io.File path)SVNAdminAreaprobeTry(java.io.File path, boolean writeLock, int depth)voidregisterCleanupHandler(SVNAdminArea area, ISVNCleanupHandler handler)SVNAdminArearetrieve(java.io.File path)voidsetAnchor(java.io.File anchor)voidsetEventHandler(ISVNEventHandler handler)voidsetOptions(ISVNOptions options)voidsetRepositoryRoot(java.io.File path, SVNURL reposRoot)SVNAdminAreaupgrade(java.io.File path)Ugrades SVNAdminArea associated with the path and cached in this SVNWCAccess instance.voidwalkEntries(java.io.File path, ISVNEntryHandler handler, boolean showHidden, boolean includeTC, SVNDepth depth)voidwalkEntries(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 SVNCancelExceptionDescription copied from interface:ISVNCancellerChecks 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:
checkCancelledin 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:ISVNEventHandlerHandles 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:
handleEventin 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()
-
-