public class LocalDiskRepositoryManager extends java.lang.Object implements GitRepositoryManager
Modifier and Type | Class and Description |
---|---|
static class |
LocalDiskRepositoryManager.Lifecycle |
static class |
LocalDiskRepositoryManager.Module |
protected class |
LocalDiskRepositoryManager.ProjectVisitor |
Modifier and Type | Method and Description |
---|---|
org.eclipse.jgit.lib.Repository |
createRepository(Project.NameKey name)
Create (and open) a repository by name.
|
java.nio.file.Path |
getBasePath(Project.NameKey name)
Return the basePath under which the specified project is stored.
|
java.util.SortedSet<Project.NameKey> |
list() |
org.eclipse.jgit.lib.Repository |
openRepository(Project.NameKey name)
Get (or open) a repository by name.
|
protected void |
scanProjects(LocalDiskRepositoryManager.ProjectVisitor visitor) |
public java.nio.file.Path getBasePath(Project.NameKey name)
name
- the name of the projectpublic org.eclipse.jgit.lib.Repository openRepository(Project.NameKey name) throws org.eclipse.jgit.errors.RepositoryNotFoundException
GitRepositoryManager
openRepository
in interface GitRepositoryManager
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.public org.eclipse.jgit.lib.Repository createRepository(Project.NameKey name) throws org.eclipse.jgit.errors.RepositoryNotFoundException, RepositoryCaseMismatchException, java.io.IOException
GitRepositoryManager
createRepository
in interface GitRepositoryManager
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.public java.util.SortedSet<Project.NameKey> list()
list
in interface GitRepositoryManager
protected void scanProjects(LocalDiskRepositoryManager.ProjectVisitor visitor)