public interface UserSettingsService
MAX_KEY_LENGTH
, Values of type String also have a max length of MAX_STRING_VALUE_LENGTH
Modifier and Type | Field and Description |
---|---|
static int |
MAX_KEY_LENGTH
Key length is limited by DB constraints.
|
static int |
MAX_STRING_VALUE_LENGTH |
static String |
USER_SETTINGS_PREFIX |
Modifier and Type | Method and Description |
---|---|
UserSettings |
getUserSettings(String userName)
Deprecated.
since 2.10, use
getUserSettings(com.atlassian.sal.api.user.UserKey) instead |
UserSettings |
getUserSettings(UserKey userKey)
Gets the UserSettings for the given user.
|
void |
updateUserSettings(String userName,
com.google.common.base.Function<UserSettingsBuilder,UserSettings> updateFunction)
Deprecated.
since 2.10, use
updateUserSettings(com.atlassian.sal.api.user.UserKey, com.google.common.base.Function) instead |
void |
updateUserSettings(UserKey userKey,
com.google.common.base.Function<UserSettingsBuilder,UserSettings> updateFunction)
Updates the UserSettings stored for this user.
|
static final String USER_SETTINGS_PREFIX
static final int MAX_STRING_VALUE_LENGTH
static final int MAX_KEY_LENGTH
@Deprecated UserSettings getUserSettings(String userName)
getUserSettings(com.atlassian.sal.api.user.UserKey)
insteaduserName
- name of the user whose user settings are to be retrievedIllegalArgumentException
- if no user could be found with that nameUserSettings getUserSettings(UserKey userKey)
userKey
- key of a user whose user settings are to be retrievedIllegalArgumentException
- if no user could be found with that name@Deprecated void updateUserSettings(String userName, com.google.common.base.Function<UserSettingsBuilder,UserSettings> updateFunction)
updateUserSettings(com.atlassian.sal.api.user.UserKey, com.google.common.base.Function)
insteaduserName
- name of the user whose UserSettings are to be updated. If userName does not match a known user,
updateFunction will not be called.updateFunction
- function to update a user's UserSettings. The parameter to updateFunction is a
UserSettingsBuilder whose contents match the UserSettings for the provided user.IllegalArgumentException
- if no user could be found with that nameUnsupportedOperationException
- if updateFunction creates entries with key length > MAX_KEY_LENGTH
or with a String value
with length > MAX_STRING_VALUE_LENGTH
void updateUserSettings(UserKey userKey, com.google.common.base.Function<UserSettingsBuilder,UserSettings> updateFunction)
userKey
- key of a user whose UserSettings are to be updated. If user is null or does not exist updateFunction will not be called.updateFunction
- function to update a user's UserSettings. The parameter to updateFunction is a
UserSettingsBuilder whose contents match the UserSettings for the provided user.IllegalArgumentException
- if no user could be found with that nameUnsupportedOperationException
- if updateFunction creates entries with key length > MAX_KEY_LENGTH
or with a String value
with length > MAX_STRING_VALUE_LENGTH
Copyright © 2015 Atlassian. All rights reserved.