Class VersionedDefaultPreferences


  • public class VersionedDefaultPreferences
    extends VersionedMetaData
    Low-level storage API to load Gerrit's default config from All-Users. Should not be used directly.
    • Constructor Detail

      • VersionedDefaultPreferences

        public VersionedDefaultPreferences()
    • 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
      • 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 class VersionedMetaData
        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 class VersionedMetaData
        Returns:
        true if the commit should proceed, false to abort.
        Throws:
        IOException