public class JDBCUserPropertyProvider extends Object implements UserPropertyProvider
UserNotFoundException.
To enable this provider, set the following in the system properties:
provider.userproperty.className = org.jivesoftware.openfire.user.property.JDBCUserPropertyProviderjdbcUserPropertyProvider.driver = com.mysql.jdbc.DriverjdbcUserPropertyProvider.connectionString = jdbc:mysql://localhost/dbname?user=username&password=secretjdbcUserPropertyProvider.loadPropertySQL = SELECT propName, propValue FROM myUser WHERE user = ? AND propName = ?jdbcUserPropertyProvider.loadPropertiesSQL = SELECT propValue FROM myUser WHERE user = ?jdbcUserPropertyProvider.useConnectionProvider = true| Constructor and Description |
|---|
JDBCUserPropertyProvider()
Constructs a new JDBC user property provider.
|
| 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.
|
public JDBCUserPropertyProvider()
public Map<String,String> loadProperties(String username) throws UnsupportedOperationException
UserPropertyProviderloadProperties in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).UnsupportedOperationExceptionpublic String loadProperty(String username, String propName)
UserPropertyProviderloadProperty in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).propName - The property name (cannot be null or empty).public void insertProperty(String username, String propName, String propValue) throws UnsupportedOperationException
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).UnsupportedOperationException - if the property cannot be addedpublic void updateProperty(String username, String propName, String propValue) throws UnsupportedOperationException
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).UnsupportedOperationException - if the property cannot be updatedpublic void deleteProperty(String username, String propName) throws UnsupportedOperationException
UserPropertyProviderdeleteProperty in interface UserPropertyProviderusername - The identifier of the user (cannot be null or empty).propName - The property name (cannot be null or empty).UnsupportedOperationException - if the property cannot be deletedpublic boolean isReadOnly()
UserPropertyProviderUnsupportedOperationException.isReadOnly in interface UserPropertyProviderCopyright © 2003–2020 Ignite Realtime. All rights reserved.