Package com.google.gerrit.server.project
Class ProjectLevelConfig.Bare
- java.lang.Object
-
- com.google.gerrit.server.git.meta.VersionedMetaData
-
- com.google.gerrit.server.project.ProjectLevelConfig.Bare
-
- Enclosing class:
- ProjectLevelConfig
public static class ProjectLevelConfig.Bare extends VersionedMetaData
This class is a low-level API that allows callers to read the config directly from a repository and make updates to it.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.server.git.meta.VersionedMetaData
VersionedMetaData.BatchMetaDataUpdate, VersionedMetaData.PathInfo
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.server.git.meta.VersionedMetaData
inserter, newTree, projectName, reader, revision, rw
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jgit.lib.Config
getConfig()
protected String
getRefName()
protected void
onLoad()
Set up the metadata, parsing any state from the loaded revision.protected boolean
onSave(org.eclipse.jgit.lib.CommitBuilder commit)
Save any changes to the metadata in a commit.-
Methods inherited from class com.google.gerrit.server.git.meta.VersionedMetaData
commit, commitToNewRef, getObjectId, getPathInfos, getRevision, load, load, load, load, load, openUpdate, readConfig, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
-
-
-
-
Constructor Detail
-
Bare
public Bare(String fileName)
-
-
Method Detail
-
getConfig
public org.eclipse.jgit.lib.Config getConfig()
-
getRefName
protected String getRefName()
- Specified by:
getRefName
in classVersionedMetaData
- Returns:
- name of the reference storing this configuration.
-
onLoad
protected void onLoad() throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
Description copied from class:VersionedMetaData
Set up the metadata, parsing any state from the loaded revision.- Specified by:
onLoad
in classVersionedMetaData
- Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
onSave
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit) throws IOException
Description copied from class:VersionedMetaData
Save any changes to the metadata in a commit.- Specified by:
onSave
in classVersionedMetaData
- Returns:
- true if the commit should proceed, false to abort.
- Throws:
IOException
-
-