Interface UserSettings


public interface UserSettings
An immutable container of user-specific settings. Key is global - two values of different types can _not_ be stored against a common key.
  • Method Details

    • getString

      io.atlassian.fugue.Option<String> getString(String key)
      Parameters:
      key - the setting key being queried
      Returns:
      a Some containing the String stored against key if one exists (and is a String), a com.atlassian.fugue.Option#none() otherwise.
      Throws:
      IllegalArgumentException - if key is null or longer than UserSettingsService.MAX_KEY_LENGTH characters.
    • getBoolean

      io.atlassian.fugue.Option<Boolean> getBoolean(String key)
      Parameters:
      key - the setting key being queried
      Returns:
      a Some containing the Boolean stored against key if one exists (and is a Boolean), a com.atlassian.fugue.Option#none() otherwise.
      Throws:
      IllegalArgumentException - if key is null or longer than UserSettingsService.MAX_KEY_LENGTH characters.
    • getLong

      io.atlassian.fugue.Option<Long> getLong(String key)
      Parameters:
      key - the setting key being queried
      Returns:
      a Some containing the Long stored against key if one exists (and is a Long), a com.atlassian.fugue.Option#none() otherwise.
      Throws:
      IllegalArgumentException - if key is null or longer than UserSettingsService.MAX_KEY_LENGTH characters.
    • getKeys

      Set<String> getKeys()
      Returns:
      the set of keys known to this UserSettings