public interface UserSettingsService
| Modifier and Type | Method and Description |
|---|---|
UserSettings |
get(String id)
Deprecated.
Use
getById(UUID) instead |
UserSettings |
getById(UUID id)
Retrieves a UserSettings object based on its ID.
|
UserSettings |
getByUser()
Retrieves a UserSettings object for the currently logged in user or null if none exist.
|
UserSettings |
getByUser(HawkularUser user)
Retrieves a UserSettings object for the given user or null if none exist.
|
UserSettings |
getOrCreateByUser()
Retrieves a UserSettings object for the currently logged in user or a new one if none exists.
|
UserSettings |
getOrCreateByUser(HawkularUser user)
Retrieves a UserSettings object for the given user or a new one if none exists.
|
String |
getSettingByKey(HawkularUser user,
String key)
Retrieves a setting with the given key for the specified user.
|
String |
getSettingByKey(HawkularUser user,
String key,
String defaultValue)
Retrieves a setting with the given key for the specified user, returning the value specified in 'default' if
no setting is available for the key.
|
String |
getSettingByKey(String key)
Retrieves a setting with the given key for the currently logged in user.
|
String |
getSettingByKey(String key,
String defaultValue)
Retrieves a setting with the given key for the currently logged in user, returning the value specified in
'default' if no setting is available for the key.
|
String |
produceSettingByName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
CDI producer method for beans annotated with
NamedSetting. |
UserSettings |
remove(HawkularUser user,
String key)
Removes the specified setting value under the given key, for the specified user.
|
UserSettings |
remove(String key)
Removes the specified setting value under the given key, for the currently logged in user.
|
UserSettings |
store(HawkularUser user,
String key,
String value)
Stores the specified setting value under the given key, for the specified user.
|
UserSettings |
store(String key,
String value)
Stores the specified setting value under the given key, for the currently logged in user.
|
@Deprecated UserSettings get(String id)
getById(UUID) insteadid - the UserSettings IDUserSettings getById(UUID id)
id - the UserSettings IDUserSettings getByUser()
UserSettings getByUser(HawkularUser user)
user - the user that the settings belong toUserSettings getOrCreateByUser()
UserSettings getOrCreateByUser(HawkularUser user)
user - the user that the settings belong toString getSettingByKey(String key)
key - the setting's keyString getSettingByKey(String key, String defaultValue)
key - the setting's keydefaultValue - the value to be returned should the key not exist for the userString getSettingByKey(HawkularUser user, String key)
user - the user to retrieve the setting fromkey - the setting's keyString getSettingByKey(HawkularUser user, String key, String defaultValue)
user - the user to retrieve the setting fromkey - the setting's keydefaultValue - the value to be returned should the key not exist for the userUserSettings store(HawkularUser user, String key, String value)
user - the user which the setting refers tokey - the setting's keyvalue - the setting's valueUserSettings store(String key, String value)
key - the setting's keyvalue - the setting's valueUserSettings remove(HawkularUser user, String key)
user - the user which the setting refers tokey - the setting's keyUserSettings remove(String key)
key - the setting's keyString produceSettingByName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
NamedSetting. This method is not intended to be called by
consumers of the API.injectionPoint - the CDI InjectionPointCopyright © 2015 Red Hat, Inc.. All rights reserved.