|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.gate.versioning.svnkit.SandboxManager
class SandboxManager
This class manages a set of Sandboxes. This is a Spring Bean and it is assumed that this will be a singleton. It ensures that there is never more than one Sandbox object for any given SVN-managed file tree, and it linearises operations on these objects. It is intended to be thread-safe. NOTE: this API assumes that its clients are friendly enough not to add a sandbox that is a subdirectory of another sandbox also being managed. If this rule is not followed then the results will be unpredictable!
Field Summary | |
---|---|
private File |
configDir
A directory holding subversion config info, if null then the users default .subversion directory will be used |
private static Logger |
log
|
ConcurrentMap |
sandboxMap
A map of sandboxes to their ids. |
Constructor Summary | |
SandboxManager()
|
Method Summary | |
---|---|
boolean
|
addSandbox(File location, String username, String password)
Add a new Sandbox. |
boolean
|
addSandbox(File location, ISVNAuthenticationManager authManager)
Add a new Sandbox. |
void
|
addSandboxes(List folderIds, String username, String password)
This method adds a list of sandboxes to the sandboxMap. |
SVNURL
|
createLocalRepository(File location)
Create a new local SVN repository. |
void
|
forgetSandbox(File sbDir)
Forget a sandbox. |
File
|
getConfigDir()
|
Sandbox
|
getSandbox(String id)
Get a sandbox from its ID (canonical path to the directory tree). |
String
|
getSandboxId(File sbDir)
Generate an ID for a File that points to a sandbox tree on disk. |
List
|
getSandboxList()
Get an (immutable) list of all known sandboxes. |
Map
|
getSandboxMap()
Get an (immutable) map of all known sandboxes indexed by id. |
boolean
|
isSandboxDir(File sbDir)
Check that a File points to a valid sandbox on disk. |
void
|
setConfigDir(File dir)
|
void
|
shutdown()
Close all managed sandboxes. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Field Detail |
---|
private File configDir
private static final Logger log
ConcurrentMap sandboxMap
Constructor Detail |
---|
SandboxManager()
Method Detail |
---|
public boolean addSandbox(File location, String username, String password)
public boolean addSandbox(File location, ISVNAuthenticationManager authManager)
public void addSandboxes(List folderIds, String username, String password)
public SVNURL createLocalRepository(File location)
public void forgetSandbox(File sbDir)
public File getConfigDir()
public Sandbox getSandbox(String id)
public String getSandboxId(File sbDir)
public List getSandboxList()
public Map getSandboxMap()
public boolean isSandboxDir(File sbDir)
public void setConfigDir(File dir)
public void shutdown()
Groovy Documentation