Class VersionedConfigFile
java.lang.Object
com.google.gerrit.server.git.meta.VersionedMetaData
com.google.gerrit.server.git.meta.VersionedConfigFile
- Direct Known Subclasses:
- VersionedDefaultPreferences
Versioned configuration file living in git
 
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 SummaryNested classes/interfaces inherited from class com.google.gerrit.server.git.meta.VersionedMetaDataVersionedMetaData.BatchMetaDataUpdate, VersionedMetaData.PathInfo
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected org.eclipse.jgit.lib.Configprotected final Stringprotected final Stringprotected final StringFields inherited from class com.google.gerrit.server.git.meta.VersionedMetaDatainserter, newTree, projectName, reader, revision, rw
- 
Constructor SummaryConstructorsConstructorDescriptionVersionedConfigFile(String fileName) VersionedConfigFile(String ref, String fileName) VersionedConfigFile(String ref, String fileName, String defaultOnSaveMessage) 
- 
Method SummaryModifier and TypeMethodDescriptionorg.eclipse.jgit.lib.Configprotected Stringprotected StringReturns 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.VersionedMetaDatacommit, commit, commitToNewRef, getObjectId, getPathInfos, getRevision, load, load, load, load, load, openUpdate, openUpdate, readConfig, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
- 
Field Details- 
ref
- 
fileName
- 
defaultOnSaveMessage
- 
cfgprotected org.eclipse.jgit.lib.Config cfg
 
- 
- 
Constructor Details- 
VersionedConfigFile
- 
VersionedConfigFile
- 
VersionedConfigFile
 
- 
- 
Method Details- 
getConfigpublic org.eclipse.jgit.lib.Config getConfig()
- 
getFileName
- 
getRefNameDescription copied from class:VersionedMetaDataReturns name of the reference storing this configuration.- Specified by:
- getRefNamein class- VersionedMetaData
 
- 
onLoadDescription copied from class:VersionedMetaDataSet up the metadata, parsing any state from the loaded revision.- Specified by:
- onLoadin class- VersionedMetaData
- Throws:
- IOException
- org.eclipse.jgit.errors.ConfigInvalidException
 
- 
onSaveprotected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException Description copied from class:VersionedMetaDataSave any changes to the metadata in a commit.- Specified by:
- onSavein class- VersionedMetaData
- Returns:
- true if the commit should proceed, false to abort.
- Throws:
- IOException
- org.eclipse.jgit.errors.ConfigInvalidException
 
 
-