public class DefaultUserPropertyProvider extends Object implements UserPropertyProvider
ofUserProp database table.
This implementation will not explicitly verify if a user exists, when operating on its properties. The methods of
this implementation will not throw UserNotFoundException.
Warning: in virtually all cases a user property provider should not be used directly. Instead, use the
Map returned by User.getProperties() to create, read, update or delete user properties. Failure to do so
is likely to result in inconsistent data behavior and race conditions. Direct access to the user property
provider is only provided for special-case logic.User.getProperties()| Constructor and Description |
|---|
DefaultUserPropertyProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteProperty(String username,
String propName)
Removes one particular property for a particular user.
|
void |
insertProperty(String username,
String propName,
String propValue)
Adds a property for an user.
|
boolean |
isReadOnly()
Returns true if this UserPropertyProvider is read-only.
|
Map<String,String> |
loadProperties(String username)
Retrieves all properties for a particular user.
|
String |
loadProperty(String username,
String propertyName)
Retrieves a property value for a user.
|
void |
updateProperty(String username,
String propName,
String propValue)
Changes a property value for an user.
|
public Map<String,String> loadProperties(String username)
UserPropertyProviderloadProperties in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).public String loadProperty(String username, String propertyName)
UserPropertyProviderloadProperty in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).propertyName - The property name (cannot be null or empty).public void insertProperty(String username, String propName, String propValue)
UserPropertyProviderinsertProperty in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).propName - The property name (cannot be null or empty).propValue - The property value (cannot be null).public void updateProperty(String username, String propName, String propValue)
UserPropertyProviderupdateProperty in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).propName - The property name (cannot be null or empty).propValue - The property value (cannot be null).public void deleteProperty(String username, String propName)
UserPropertyProviderdeleteProperty in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).propName - The property name (cannot be null or empty).public boolean isReadOnly()
UserPropertyProviderUnsupportedOperationException.isReadOnly in interface UserPropertyProviderCopyright © 2003–2019 Ignite Realtime. All rights reserved.