public interface GitRepositoryManager
Implementations of this interface should be a Singleton
and registered in Guice so
they are globally available within the server environment.
Modifier and Type | Method and Description |
---|---|
org.eclipse.jgit.lib.Repository |
createRepository(Project.NameKey name)
Create (and open) a repository by name.
|
java.util.SortedSet<Project.NameKey> |
list() |
org.eclipse.jgit.lib.Repository |
openRepository(Project.NameKey name)
Get (or open) a repository by name.
|
org.eclipse.jgit.lib.Repository openRepository(Project.NameKey name) throws org.eclipse.jgit.errors.RepositoryNotFoundException, java.io.IOException
name
- the repository name, relative to the base directory.close()
when done to decrement
the resource handle.org.eclipse.jgit.errors.RepositoryNotFoundException
- the name does not denote an existing repository.java.io.IOException
- the name cannot be read as a repository.org.eclipse.jgit.lib.Repository createRepository(Project.NameKey name) throws RepositoryCaseMismatchException, org.eclipse.jgit.errors.RepositoryNotFoundException, java.io.IOException
name
- the repository name, relative to the base directory.close()
when done to decrement
the resource handle.RepositoryCaseMismatchException
- the name collides with an existing repository name, but
only in case of a character within the name.org.eclipse.jgit.errors.RepositoryNotFoundException
- the name is invalid.java.io.IOException
- the repository cannot be created.java.util.SortedSet<Project.NameKey> list()