com.uwyn.rife.authentication.credentialsmanagers
Class DatabaseUsers
java.lang.Object
com.uwyn.rife.database.DbQueryManager
com.uwyn.rife.authentication.credentialsmanagers.DatabaseUsers
- All Implemented Interfaces:
- CredentialsManager, IdentifiableUsersManager, RoleUsersManager, PasswordEncrypting, Cloneable
public abstract class DatabaseUsers
- extends DbQueryManager
- implements CredentialsManager, RoleUsersManager, PasswordEncrypting
|
Method Summary |
protected 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 |
_getLogin(Select getLogin,
long userId)
|
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)
|
StringEncryptor |
getPasswordEncryptor()
|
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 com.uwyn.rife.database.DbQueryManager |
clone, executeFetchAll, executeFetchAll, executeFetchAllBeans, executeFetchAllBeans, 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, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUseFirstAsciiStream, executeUseFirstAsciiStream, executeUseFirstBinaryStream, executeUseFirstBinaryStream, executeUseFirstCharacterStream, executeUseFirstCharacterStream, fetch, fetch, fetchAll, getConnection, getDatasource, inTransaction, reserveConnection |
| Methods inherited from interface com.uwyn.rife.authentication.credentialsmanagers.RoleUsersManager |
addRole, addUser, clearUsers, containsRole, containsUser, countRoles, countUsers, getUserId, isUserInRole, listRoles, listUserRoles, listUsers, listUsers, listUsersInRole, removeRole, removeUser, removeUser, updateUser |
mPasswordEncryptor
protected StringEncryptor mPasswordEncryptor
DatabaseUsers
protected DatabaseUsers(Datasource datasource)
install
public abstract boolean install()
throws CredentialsManagerException
- Throws:
CredentialsManagerException
remove
public abstract boolean remove()
throws CredentialsManagerException
- Throws:
CredentialsManagerException
getPasswordEncryptor
public StringEncryptor getPasswordEncryptor()
setPasswordEncryptor
public void setPasswordEncryptor(StringEncryptor passwordEncryptor)
- Description copied from interface:
PasswordEncrypting
- Sets the password encryptor to use to encrypt this credentials
manager's passwords.
- Specified by:
setPasswordEncryptor in interface PasswordEncrypting
- Parameters:
passwordEncryptor - the password ecryptor 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
protected long _countRoles(Select countRoles)
throws CredentialsManagerException
- 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
protected long _countUsers(Select countUsers)
throws CredentialsManagerException
- Throws:
CredentialsManagerException
_getLogin
protected String _getLogin(Select getLogin,
long userId)
throws CredentialsManagerException
- Throws:
CredentialsManagerException
_getUserId
protected long _getUserId(Select getUserId,
String login)
throws CredentialsManagerException
- 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
protected boolean _removeRole(Delete removeRole,
String name)
throws CredentialsManagerException
- Throws:
CredentialsManagerException
_clearUsers
protected void _clearUsers(Delete clearUsers)
throws CredentialsManagerException
- Throws:
CredentialsManagerException
_listUserRoles
protected boolean _listUserRoles(Select listUserRolesQuery,
String login,
ListRoles processor)
throws CredentialsManagerException
- Throws:
CredentialsManagerException
Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.