@PermitAll public class UserSettingsServiceImpl extends BaseServiceImpl<UserSettings> implements UserSettingsService
| Constructor and Description |
|---|
UserSettingsServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
UserSettings |
get(String id)
Retrieves a UserSettings object based on its ID.
|
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.
|
getByIdpublic UserSettings get(String id)
UserSettingsServiceget in interface UserSettingsServiceid - the UserSettings IDpublic UserSettings getById(UUID id)
UserSettingsServicegetById in interface UserSettingsServiceid - the UserSettings IDpublic UserSettings getByUser()
UserSettingsServicegetByUser in interface UserSettingsServicepublic UserSettings getByUser(HawkularUser user)
UserSettingsServicegetByUser in interface UserSettingsServiceuser - the user that the settings belong topublic UserSettings getOrCreateByUser()
UserSettingsServicegetOrCreateByUser in interface UserSettingsServicepublic UserSettings getOrCreateByUser(HawkularUser user)
UserSettingsServicegetOrCreateByUser in interface UserSettingsServiceuser - the user that the settings belong topublic String getSettingByKey(String key)
UserSettingsServicegetSettingByKey in interface UserSettingsServicekey - the setting's keypublic String getSettingByKey(String key, String defaultValue)
UserSettingsServicegetSettingByKey in interface UserSettingsServicekey - the setting's keydefaultValue - the value to be returned should the key not exist for the userpublic String getSettingByKey(HawkularUser user, String key)
UserSettingsServicegetSettingByKey in interface UserSettingsServiceuser - the user to retrieve the setting fromkey - the setting's keypublic String getSettingByKey(HawkularUser user, String key, String defaultValue)
UserSettingsServicegetSettingByKey in interface UserSettingsServiceuser - the user to retrieve the setting fromkey - the setting's keydefaultValue - the value to be returned should the key not exist for the userpublic UserSettings store(HawkularUser user, String key, String value)
UserSettingsServicestore in interface UserSettingsServiceuser - the user which the setting refers tokey - the setting's keyvalue - the setting's valuepublic UserSettings store(String key, String value)
UserSettingsServicestore in interface UserSettingsServicekey - the setting's keyvalue - the setting's valuepublic UserSettings remove(HawkularUser user, String key)
UserSettingsServiceremove in interface UserSettingsServiceuser - the user which the setting refers tokey - the setting's keypublic UserSettings remove(String key)
UserSettingsServiceremove in interface UserSettingsServicekey - the setting's key@Produces public String produceSettingByName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
UserSettingsServiceNamedSetting. This method is not intended to be called by
consumers of the API.produceSettingByName in interface UserSettingsServiceinjectionPoint - the CDI InjectionPointCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.