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.ConfiggetConfig()protected StringgetRefName()Returns name of the reference storing this configuration.protected voidonLoad()Set up the metadata, parsing any state from the loaded revision.protected booleanonSave(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, commit, commitToNewRef, getObjectId, getPathInfos, getRevision, load, load, load, load, load, openUpdate, 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()
Description copied from class:VersionedMetaDataReturns name of the reference storing this configuration.- Specified by:
getRefNamein classVersionedMetaData
-
onLoad
protected void onLoad() throws IOException, org.eclipse.jgit.errors.ConfigInvalidExceptionDescription copied from class:VersionedMetaDataSet up the metadata, parsing any state from the loaded revision.- Specified by:
onLoadin classVersionedMetaData- Throws:
IOExceptionorg.eclipse.jgit.errors.ConfigInvalidException
-
onSave
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit) throws IOExceptionDescription copied from class:VersionedMetaDataSave any changes to the metadata in a commit.- Specified by:
onSavein classVersionedMetaData- Returns:
- true if the commit should proceed, false to abort.
- Throws:
IOException
-
-