@ApplicationScoped public class UserConfigurationServiceImpl extends Object implements UserConfigurationService
| Constructor and Description |
|---|
UserConfigurationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.configuration.Configuration |
getUserConfiguration(UserAccount user) |
String |
getUserConfiguration(UserAccount user,
String key)
Get the configuration for the given user and key.
|
String |
getUserConfiguration(UserAccount user,
String key,
String defaultValue)
Get the configuration for the given user and key.
|
List<Object> |
getUserListConfiguration(UserAccount user,
String key)
Return the list configuration value of the given key for the given user.
|
List<Object> |
getUserListConfiguration(UserAccount user,
String key,
List<Object> defaultValue)
Return the list configuration value of the given key for the given user.
|
void |
initialise() |
boolean |
isUserConfigurationSet(UserAccount user,
String key)
Check whether the given configuration is set for the given user.
|
void |
removeUserConfiguration(UserAccount user,
String key)
Remove the user configuration identified by "key" from the database.
|
void |
save(UserAccount user) |
void |
setUserConfiguration(UserAccount user,
String key,
String value)
Set the configuration "key" to the string value "value".
|
void |
setUserListConfiguration(UserAccount user,
String key,
List<String> values)
Set the configuration "key" to the string value "value".
|
@PostConstruct public void initialise()
public boolean isUserConfigurationSet(UserAccount user, String key)
UserConfigurationServiceisUserConfigurationSet in interface UserConfigurationServicepublic String getUserConfiguration(UserAccount user, String key, String defaultValue)
UserConfigurationServicegetUserConfiguration in interface UserConfigurationServiceuser - the user for whom to get the configurationkey - unique configuration key for lookupdefaultValue - default value if configuration not foundpublic String getUserConfiguration(UserAccount user, String key)
UserConfigurationServicegetUserConfiguration in interface UserConfigurationServiceuser - the user for whom to get the configurationkey - unique configuration key for lookuppublic List<Object> getUserListConfiguration(UserAccount user, String key)
UserConfigurationServicegetUserListConfiguration in interface UserConfigurationServicepublic List<Object> getUserListConfiguration(UserAccount user, String key, List<Object> defaultValue)
UserConfigurationServicegetUserListConfiguration in interface UserConfigurationServicepublic void removeUserConfiguration(UserAccount user, String key)
UserConfigurationServiceremoveUserConfiguration in interface UserConfigurationServicepublic void setUserListConfiguration(UserAccount user, String key, List<String> values)
UserConfigurationServicesetUserListConfiguration in interface UserConfigurationServicepublic void setUserConfiguration(UserAccount user, String key, String value)
UserConfigurationServicesetUserConfiguration in interface UserConfigurationServicepublic org.apache.commons.configuration.Configuration getUserConfiguration(UserAccount user)
public void save(UserAccount user)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.