public interface UserSettingsBuilder
UserSettings
Modifier and Type | Method and Description |
---|---|
UserSettings |
build() |
com.atlassian.fugue.Option<Object> |
get(String key) |
Set<String> |
getKeys() |
UserSettingsBuilder |
put(String key,
boolean value)
add an extra entry to the builder, overwriting any existing value stored against key (regardless of type)
|
UserSettingsBuilder |
put(String key,
long value)
add an extra entry to the builder, overwriting any existing value stored against key (regardless of type)
|
UserSettingsBuilder |
put(String key,
String value)
add an extra entry to the builder, overwriting any existing value stored against key (regardless of type)
|
UserSettingsBuilder |
remove(String key)
remove an entry from the builder
|
UserSettingsBuilder put(String key, String value)
key
- the key to store the value againstvalue
- the non-null String to store, length cannot be longer than UserSettingsService.MAX_KEY_LENGTH
IllegalArgumentException
- if value is null, or value is longer than UserSettingsService.MAX_STRING_VALUE_LENGTH
characters, or key is null or longer than UserSettingsService.MAX_KEY_LENGTH
characters.UserSettingsBuilder put(String key, boolean value)
key
- the key to store the value againstvalue
- the boolean to storeIllegalArgumentException
- if key is null or longer than UserSettingsService.MAX_KEY_LENGTH
characters.UserSettingsBuilder put(String key, long value)
key
- the key to store the value againstvalue
- the long to storeIllegalArgumentException
- if key is null or longer than UserSettingsService.MAX_KEY_LENGTH
characters.UserSettingsBuilder remove(String key)
key
- the key for the entry to removeIllegalArgumentException
- if key is null or longer than UserSettingsService.MAX_KEY_LENGTH
characters.com.atlassian.fugue.Option<Object> get(String key)
key
- the setting key being queriedSome
containing the value stored against key if one exists, a Option.none()
otherwise. Values can be of type String, Boolean or Long.IllegalArgumentException
- if key is null or longer than UserSettingsService.MAX_KEY_LENGTH
characters.UserSettings build()
Copyright © 2015 Atlassian. All rights reserved.