public interface LocalRepoManagerFactory
| Modifier and Type | Interface and Description |
|---|---|
static class |
LocalRepoManagerFactory.Helper |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocalRepoManagerCloseListener(LocalRepoManagerCloseListener listener) |
void |
close() |
LocalRepoManager |
createLocalRepoManagerForExistingRepository(File localRoot)
Creates a
LocalRepoManager for the given localRoot. |
LocalRepoManager |
createLocalRepoManagerForNewRepository(File localRoot)
Creates a
LocalRepoManager for the given localRoot. |
Set<File> |
getLocalRoots() |
void |
removeLocalRepoManagerCloseListener(LocalRepoManagerCloseListener listener) |
LocalRepoManager createLocalRepoManagerForExistingRepository(File localRoot) throws LocalRepoManagerException
LocalRepoManager for the given localRoot.
Important: You must call LocalRepoManager.close(). Use a try-finally block or a
similar construction to prevent resource leakage!
If there is already a LocalRepoManager implementation instance for this localRoot, the same
instance is re-used in the background. If there is none, yet, it is implicitly instantiated and enlisted.
However, this method always returns a new proxy instance! It never returns the same instance twice.
If localRoot is not an existing repository in the file system, one of the following
exceptions is thrown:
localRoot - the root-directory of the repository. Must not be null. Can be
relative or absolute.LocalRepoManagerImpl for the given localRoot. Never null.LocalRepoManagerException - if the given localRoot does not denote the root-directory
of an existing repository.createLocalRepoManagerForNewRepository(File)LocalRepoManager createLocalRepoManagerForNewRepository(File localRoot) throws LocalRepoManagerException
LocalRepoManager for the given localRoot.
Important: You must call LocalRepoManager.close(). Use a try-finally block or a
similar construction to prevent resource leakage!
This method turns an existing directory into a repository. If localRoot already is a repository,
a FileAlreadyRepositoryException is thrown.
If localRoot is not an existing directory in the file system, one of the following
exceptions is thrown:
localRoot - the directory which is turned into the repository's root. Must not be null.
Can be relative or absolute.LocalRepoManager for the given localRoot. Never null.LocalRepoManagerException - if the given localRoot does not denote an existing directory
or if it is a directory inside an existing repository.void close()
void addLocalRepoManagerCloseListener(LocalRepoManagerCloseListener listener)
void removeLocalRepoManagerCloseListener(LocalRepoManagerCloseListener listener)
Set<File> getLocalRoots()
Copyright © 2013-2014. All Rights Reserved.