Package com.google.gerrit.server.config
Class VersionedDefaultPreferences
- java.lang.Object
-
- com.google.gerrit.server.git.meta.VersionedMetaData
-
- com.google.gerrit.server.config.VersionedDefaultPreferences
-
public class VersionedDefaultPreferences extends VersionedMetaData
Low-level storage API to load Gerrit's default config fromAll-Users
. Should not be used directly.
-
-
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
-
-
Constructor Summary
Constructors Constructor Description VersionedDefaultPreferences()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.eclipse.jgit.lib.Config
get(org.eclipse.jgit.lib.Repository allUsersRepo, AllUsersName allUsersName)
org.eclipse.jgit.lib.Config
getConfig()
protected String
getRefName()
Returns name of the reference storing this configuration.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, commit, commitToNewRef, getObjectId, getPathInfos, getRevision, load, load, load, load, load, openUpdate, openUpdate, readConfig, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
-
-
-
-
Method Detail
-
get
public static org.eclipse.jgit.lib.Config get(org.eclipse.jgit.lib.Repository allUsersRepo, AllUsersName allUsersName) throws com.google.gerrit.exceptions.StorageException, org.eclipse.jgit.errors.ConfigInvalidException
- Throws:
com.google.gerrit.exceptions.StorageException
org.eclipse.jgit.errors.ConfigInvalidException
-
getRefName
protected String getRefName()
Description copied from class:VersionedMetaData
Returns name of the reference storing this configuration.- Specified by:
getRefName
in classVersionedMetaData
-
getConfig
public org.eclipse.jgit.lib.Config getConfig()
-
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
-
-