com.atlassian.sal.api.usersettings
Interface UserSettings

All Known Implementing Classes:
DefaultUserSettings

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 Summary
 com.atlassian.fugue.Option<Boolean> getBoolean(String key)
           
 Set<String> getKeys()
           
 com.atlassian.fugue.Option<Long> getLong(String key)
           
 com.atlassian.fugue.Option<String> getString(String key)
           
 

Method Detail

getString

com.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 Option.none() otherwise.
Throws:
IllegalArgumentException - if key is null or longer than UserSettingsService.MAX_KEY_LENGTH characters.

getBoolean

com.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 Option.none() otherwise.
Throws:
IllegalArgumentException - if key is null or longer than UserSettingsService.MAX_KEY_LENGTH characters.

getLong

com.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 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


Copyright © 2015 Atlassian. All rights reserved.