Package com.google.gerrit.server.account
Class VersionedAccountPreferences
- java.lang.Object
-
- com.google.gerrit.server.git.VersionedMetaData
-
- com.google.gerrit.server.account.VersionedAccountPreferences
-
public class VersionedAccountPreferences extends VersionedMetaData
Preferences for user accounts.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.server.git.VersionedMetaData
VersionedMetaData.BatchMetaDataUpdate, VersionedMetaData.PathInfo
-
-
Field Summary
Fields Modifier and Type Field Description static String
PREFERENCES
-
Constructor Summary
Constructors Modifier Constructor Description protected
VersionedAccountPreferences(String ref)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VersionedAccountPreferences
forDefault()
static VersionedAccountPreferences
forUser(Account.Id id)
org.eclipse.jgit.lib.Config
getConfig()
protected String
getRefName()
boolean
isDefaults()
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.VersionedMetaData
commit, commitToNewRef, getObjectId, getPathInfos, getRevision, load, load, load, load, load, openUpdate, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
-
-
-
-
Field Detail
-
PREFERENCES
public static final String PREFERENCES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VersionedAccountPreferences
protected VersionedAccountPreferences(String ref)
-
-
Method Detail
-
forUser
public static VersionedAccountPreferences forUser(Account.Id id)
-
forDefault
public static VersionedAccountPreferences forDefault()
-
isDefaults
public boolean isDefaults()
-
getRefName
protected String getRefName()
- Specified by:
getRefName
in classVersionedMetaData
- Returns:
- name of the reference storing this configuration.
-
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, org.eclipse.jgit.errors.ConfigInvalidException
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
org.eclipse.jgit.errors.ConfigInvalidException
-
-