public interface UserPropertyProvider
UserNotFoundException
when processing property data for non-existing users. Implementations should clearly document their behavior in
this respect.
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()
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 propName)
Retrieves a property value for a user.
|
void |
updateProperty(String username,
String propName,
String propValue)
Changes a property value for an user.
|
boolean isReadOnly()
UnsupportedOperationException
.Map<String,String> loadProperties(String username) throws UserNotFoundException
username
- The identifier of the user (cannot be null or empty).UserNotFoundException
String loadProperty(String username, String propName) throws UserNotFoundException
username
- The identifier of the user (cannot be null or empty).propName
- The property name (cannot be null or empty).UserNotFoundException
void insertProperty(String username, String propName, String propValue) throws UserNotFoundException, UnsupportedOperationException
username
- 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).UserNotFoundException
UnsupportedOperationException
void updateProperty(String username, String propName, String propValue) throws UserNotFoundException, UnsupportedOperationException
username
- 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).UserNotFoundException
UnsupportedOperationException
void deleteProperty(String username, String propName) throws UserNotFoundException, UnsupportedOperationException
username
- The identifier of the user (cannot be null or empty).propName
- The property name (cannot be null or empty).UserNotFoundException
UnsupportedOperationException
Copyright © 2003-2008 Jive Software.