Class DatabaseUsers
java.lang.Object
rife.database.DbQueryManager
rife.authentication.credentialsmanagers.DatabaseUsers
- All Implemented Interfaces:
Cloneable
,CredentialsManager
,IdentifiableUsersManager
,RoleUsersManager
,PasswordEncrypting
public abstract class DatabaseUsers
extends DbQueryManager
implements CredentialsManager, RoleUsersManager, PasswordEncrypting
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static class
protected static class
protected static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_addRole
(SequenceValue getRoleId, Insert addRole, String role) protected void
_addUser
(Insert addUserWithId, Select getFreeUserId, Select getRoleId, Insert addRoleLink, String login, RoleUserAttributes attributes) protected void
_clearUsers
(Delete clearUsers) protected boolean
_containsRole
(Select containsRole, String role) protected boolean
_containsUser
(Select containsUser, String login) protected long
_countRoles
(Select countRoles) protected long
_countUsers
(Select countUsers) protected RoleUserAttributes
_getAttributes
(Select getAttributes, Select getUserRoles, String login) protected String
protected String
_getPassword
(Select getPassword, String login) protected long
_getUserId
(Select getUserId, String login) protected boolean
_install
(CreateSequence createSequenceRole, CreateTable createTableRole, CreateTable createTableUser, CreateTable createTableRoleLink) protected boolean
_isUserInRole
(Select isUserInRole, long userId, String role) protected boolean
_listRoles
(Select listRolesQuery, ListRoles processor) protected boolean
_listUserRoles
(Select listUserRolesQuery, String login, ListRoles processor) protected boolean
_listUsers
(Select listUsersQuery, ListUsers processor) protected boolean
_listUsers
(Select listUsersRangedQuery, ListUsers processor, int limit, int offset) protected boolean
_listUsersInRole
(Select listUsersInRole, ListUsers processor, String role) protected boolean
_remove
(DropSequence dropSequenceRole, DropTable dropTableRole, DropTable dropTableUser, DropTable dropTableRoleLink) protected boolean
_removeRole
(Delete removeRole, String name) protected boolean
_removeUser
(Delete removeUserByUserId, long userId) protected boolean
_removeUser
(Delete removeUserByLogin, String login) protected boolean
_updateUser
(Update updateUser, Delete removeRoleLinksByUser, Select getRoleId, Insert addRoleLink, String login, RoleUserAttributes attributes) protected long
_verifyCredentials
(Select verifyCredentialsNoRole, Select verifyCredentialsRole, Credentials credentials) abstract String
getPassword
(String login) abstract boolean
install()
abstract boolean
remove()
void
setPasswordEncryptor
(StringEncryptor passwordEncryptor) Sets the password encryptor to use to encrypt this credentials manager's passwords.Methods inherited from class rife.database.DbQueryManager
clone, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAllBeans, executeFetchAllBeans, executeFetchFirst, executeFetchFirst, executeFetchFirst, executeFetchFirst, executeFetchFirstBean, executeFetchFirstBean, executeGetFirstBoolean, executeGetFirstBoolean, executeGetFirstByte, executeGetFirstByte, executeGetFirstBytes, executeGetFirstBytes, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDouble, executeGetFirstDouble, executeGetFirstFloat, executeGetFirstFloat, executeGetFirstInt, executeGetFirstInt, executeGetFirstLong, executeGetFirstLong, executeGetFirstShort, executeGetFirstShort, executeGetFirstString, executeGetFirstString, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeHasResultRows, executeHasResultRows, executeQuery, executeQuery, executeResultQuery, executeUpdate, executeUpdate, executeUpdate, executeUseFirstAsciiStream, executeUseFirstAsciiStream, executeUseFirstBinaryStream, executeUseFirstBinaryStream, executeUseFirstCharacterStream, executeUseFirstCharacterStream, fetch, fetch, fetch, fetchAll, fetchAll, getConnection, getDatasource, inTransaction, inTransaction, reserveConnection
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface rife.authentication.CredentialsManager
verifyCredentials
Methods inherited from interface rife.authentication.credentialsmanagers.IdentifiableUsersManager
getAttributes, getLogin
Methods inherited from interface rife.authentication.credentialsmanagers.RoleUsersManager
addRole, addUser, clearUsers, containsRole, containsUser, countRoles, countUsers, getUserId, isUserInRole, listRoles, listUserRoles, listUsers, listUsers, listUsersInRole, removeRole, removeUser, removeUser, updateUser
-
Field Details
-
passwordEncryptor_
-
-
Constructor Details
-
DatabaseUsers
-
-
Method Details
-
install
- Throws:
CredentialsManagerException
-
remove
- Throws:
CredentialsManagerException
-
getPasswordEncryptor
-
setPasswordEncryptor
Description copied from interface:PasswordEncrypting
Sets the password encryptor to use to encrypt this credentials manager's passwords.- Specified by:
setPasswordEncryptor
in interfacePasswordEncrypting
- Parameters:
passwordEncryptor
- the password encryptor that will be used
-
_install
protected boolean _install(CreateSequence createSequenceRole, CreateTable createTableRole, CreateTable createTableUser, CreateTable createTableRoleLink) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_remove
protected boolean _remove(DropSequence dropSequenceRole, DropTable dropTableRole, DropTable dropTableUser, DropTable dropTableRoleLink) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_verifyCredentials
protected long _verifyCredentials(Select verifyCredentialsNoRole, Select verifyCredentialsRole, Credentials credentials) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_addRole
protected void _addRole(SequenceValue getRoleId, Insert addRole, String role) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_containsRole
protected boolean _containsRole(Select containsRole, String role) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_countRoles
- Throws:
CredentialsManagerException
-
_listRoles
protected boolean _listRoles(Select listRolesQuery, ListRoles processor) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_addUser
protected void _addUser(Insert addUserWithId, Select getFreeUserId, Select getRoleId, Insert addRoleLink, String login, RoleUserAttributes attributes) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_getAttributes
protected RoleUserAttributes _getAttributes(Select getAttributes, Select getUserRoles, String login) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_containsUser
protected boolean _containsUser(Select containsUser, String login) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_countUsers
- Throws:
CredentialsManagerException
-
_getLogin
- Throws:
CredentialsManagerException
-
_getUserId
- Throws:
CredentialsManagerException
-
getPassword
- Throws:
CredentialsManagerException
-
_getPassword
- Throws:
CredentialsManagerException
-
_listUsers
protected boolean _listUsers(Select listUsersQuery, ListUsers processor) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_listUsers
protected boolean _listUsers(Select listUsersRangedQuery, ListUsers processor, int limit, int offset) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_isUserInRole
protected boolean _isUserInRole(Select isUserInRole, long userId, String role) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_listUsersInRole
protected boolean _listUsersInRole(Select listUsersInRole, ListUsers processor, String role) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_updateUser
protected boolean _updateUser(Update updateUser, Delete removeRoleLinksByUser, Select getRoleId, Insert addRoleLink, String login, RoleUserAttributes attributes) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_removeUser
protected boolean _removeUser(Delete removeUserByLogin, String login) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_removeUser
protected boolean _removeUser(Delete removeUserByUserId, long userId) throws CredentialsManagerException - Throws:
CredentialsManagerException
-
_removeRole
- Throws:
CredentialsManagerException
-
_clearUsers
- Throws:
CredentialsManagerException
-
_listUserRoles
protected boolean _listUserRoles(Select listUserRolesQuery, String login, ListRoles processor) throws CredentialsManagerException - Throws:
CredentialsManagerException
-