Class StoredPreferences


  • public class StoredPreferences
    extends Object
    Parses/writes preferences from/to a Config file.

    This is a low-level API. Read/write of preferences in a user branch should be done through AccountsUpdate or AccountConfig.

    The config file has separate sections for general, diff and edit preferences:

       [diff]
         hideTopMenu = true
       [edit]
         lineLength = 80
     

    The parameter names match the names that are used in the preferences REST API.

    If the preference is omitted in the config file, then the default value for the preference is used.

    Defaults for preferences that apply for all accounts can be configured in the refs/users/default branch in the All-Users repository. The config for the default preferences must be provided to this class so that it can read default values from it.

    The preferences are lazily parsed.