Package com.google.gerrit.pgm.init.api
Class GitRepositoryManagerOnInit
- java.lang.Object
-
- com.google.gerrit.pgm.init.api.GitRepositoryManagerOnInit
-
- All Implemented Interfaces:
GitRepositoryManager
public class GitRepositoryManagerOnInit extends Object implements GitRepositoryManager
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jgit.lib.Repository
createRepository(Project.NameKey name)
Create (and open) a repository by name.SortedSet<Project.NameKey>
list()
org.eclipse.jgit.lib.Repository
openRepository(Project.NameKey name)
Get (or open) a repository by name.
-
-
-
Method Detail
-
openRepository
public org.eclipse.jgit.lib.Repository openRepository(Project.NameKey name) throws org.eclipse.jgit.errors.RepositoryNotFoundException, IOException
Description copied from interface:GitRepositoryManager
Get (or open) a repository by name.- Specified by:
openRepository
in interfaceGitRepositoryManager
- Parameters:
name
- the repository name, relative to the base directory.- Returns:
- the cached Repository instance. Caller must call
close()
when done to decrement the resource handle. - Throws:
org.eclipse.jgit.errors.RepositoryNotFoundException
- the name does not denote an existing repository.IOException
- the name cannot be read as a repository.
-
createRepository
public org.eclipse.jgit.lib.Repository createRepository(Project.NameKey name)
Description copied from interface:GitRepositoryManager
Create (and open) a repository by name.- Specified by:
createRepository
in interfaceGitRepositoryManager
- Parameters:
name
- the repository name, relative to the base directory.- Returns:
- the cached Repository instance. Caller must call
close()
when done to decrement the resource handle.
-
list
public SortedSet<Project.NameKey> list()
- Specified by:
list
in interfaceGitRepositoryManager
- Returns:
- set of all known projects, sorted by natural NameKey order.
-
-