Class PreferencesParserUtil

java.lang.Object
com.google.gerrit.server.config.PreferencesParserUtil

public class PreferencesParserUtil extends Object
Helper to read default or user preferences from Git-style config files.
  • Method Details

    • parseGeneralPreferences

      public static GeneralPreferencesInfo parseGeneralPreferences(org.eclipse.jgit.lib.Config cfg, org.eclipse.jgit.lib.Config defaultCfg, GeneralPreferencesInfo input) throws org.eclipse.jgit.errors.ConfigInvalidException
      Returns a GeneralPreferencesInfo that is the result of parsing defaultCfg for the server's default configs and cfg for the user's config. These configs are then overlaid to inherit values (default -> user -> input (if provided).
      Throws:
      org.eclipse.jgit.errors.ConfigInvalidException
    • parseDefaultGeneralPreferences

      public static GeneralPreferencesInfo parseDefaultGeneralPreferences(org.eclipse.jgit.lib.Config defaultCfg, GeneralPreferencesInfo input) throws org.eclipse.jgit.errors.ConfigInvalidException
      Returns a GeneralPreferencesInfo that is the result of parsing defaultCfg for the server's default configs. These configs are then overlaid to inherit values (default -> input (if provided).
      Throws:
      org.eclipse.jgit.errors.ConfigInvalidException
    • parseDiffPreferences

      public static DiffPreferencesInfo parseDiffPreferences(org.eclipse.jgit.lib.Config cfg, org.eclipse.jgit.lib.Config defaultCfg, DiffPreferencesInfo input) throws org.eclipse.jgit.errors.ConfigInvalidException
      Returns a DiffPreferencesInfo that is the result of parsing defaultCfg for the server's default configs and cfg for the user's config. These configs are then overlaid to inherit values (default -> user -> input (if provided).
      Throws:
      org.eclipse.jgit.errors.ConfigInvalidException
    • parseDefaultDiffPreferences

      public static DiffPreferencesInfo parseDefaultDiffPreferences(org.eclipse.jgit.lib.Config defaultCfg, DiffPreferencesInfo input) throws org.eclipse.jgit.errors.ConfigInvalidException
      Returns a DiffPreferencesInfo that is the result of parsing defaultCfg for the server's default configs. These configs are then overlaid to inherit values (default -> input (if provided).
      Throws:
      org.eclipse.jgit.errors.ConfigInvalidException
    • parseEditPreferences

      public static EditPreferencesInfo parseEditPreferences(org.eclipse.jgit.lib.Config cfg, org.eclipse.jgit.lib.Config defaultCfg, EditPreferencesInfo input) throws org.eclipse.jgit.errors.ConfigInvalidException
      Returns a EditPreferencesInfo that is the result of parsing defaultCfg for the server's default configs and cfg for the user's config. These configs are then overlaid to inherit values (default -> user -> input (if provided).
      Throws:
      org.eclipse.jgit.errors.ConfigInvalidException
    • parseDefaultEditPreferences

      public static EditPreferencesInfo parseDefaultEditPreferences(org.eclipse.jgit.lib.Config defaultCfg, EditPreferencesInfo input) throws org.eclipse.jgit.errors.ConfigInvalidException
      Returns a EditPreferencesInfo that is the result of parsing defaultCfg for the server's default configs. These configs are then overlaid to inherit values (default -> input (if provided).
      Throws:
      org.eclipse.jgit.errors.ConfigInvalidException