public abstract class TorqueAbstractUserManager extends AbstractUserManager
managerROLE| Constructor and Description |
|---|
TorqueAbstractUserManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkExists(String userName)
Check whether a specified user's account exists.
|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon Service lifecycle method
|
protected abstract <T extends User> |
doSelectAllUsers(Connection con)
Get all specialized Users
|
protected abstract <T extends User> |
doSelectById(Integer id,
Connection con)
Get a specialized User by id
|
protected abstract <T extends User> |
doSelectByName(String name,
Connection con)
Get a specialized User by name
|
<T extends User> |
getAllUsers()
Retrieves all users defined in the system.
|
<T extends User> |
getUser(String userName)
Retrieve a user from persistent storage using username as the key.
|
<T extends User> |
getUserById(Object id)
Retrieve a User object with specified id.
|
protected <T extends User> |
persistNewUser(T user)
Creates new user account with specified attributes.
|
void |
removeUser(User user)
Removes an user account from the system.
|
void |
saveUser(User user)
Stores User attributes.
|
addUser, authenticate, changePassword, checkExists, forcePassword, getACL, getACLFactory, getUser, getUserInstance, getUserInstancegetClassName, setClassNamedispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, servicepublic void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractEntityManagerorg.apache.avalon.framework.configuration.ConfigurationExceptionprotected abstract <T extends User> List<T> doSelectAllUsers(Connection con) throws org.apache.torque.TorqueException
con - a database connectionorg.apache.torque.TorqueException - if any database error occursprotected abstract <T extends User> T doSelectByName(String name, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
name - the name of the groupcon - a database connectionorg.apache.torque.NoRowsException - if no such group existsorg.apache.torque.TooManyRowsException - if multiple groups with the given name existorg.apache.torque.TorqueException - if any database error occurs if any other
database error occursprotected abstract <T extends User> T doSelectById(Integer id, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
id - the id of the groupcon - a database connectionorg.apache.torque.NoRowsException - if no such group existsorg.apache.torque.TooManyRowsException - if multiple groups with the given id existorg.apache.torque.TorqueException - if any database error occurs if any other
database error occurspublic void removeUser(User user) throws DataBackendException, UnknownEntityException
user - the object describing the account to be removed.DataBackendException - if there was an error accessing the data
backend.UnknownEntityException - if the user account is not present.protected <T extends User> T persistNewUser(T user) throws DataBackendException
persistNewUser in class AbstractUserManageruser - the object describing account to be created.DataBackendException - if there was an error accessing the data
backend.public void saveUser(User user) throws DataBackendException, UnknownEntityException
user - The User to be stored.DataBackendException - if there was an error accessing the data
backend.UnknownEntityException - if the role does not exist.public boolean checkExists(String userName) throws DataBackendException
userName - The name of the user to be checked.DataBackendException - if there was an error accessing the data
backend.public <T extends User> T getUser(String userName) throws UnknownEntityException, DataBackendException
TorqueAbstractSecurityEntity.retrieveAttachedObjects(Connection, Boolean)getUser in interface UserManagergetUser in class AbstractUserManageruserName - the name of the user.UnknownEntityException - if the user's account does not exist in the
database.DataBackendException - if there is a problem accessing the
storage.public <T extends User> UserSet<T> getAllUsers() throws DataBackendException
DataBackendException - if there was an error accessing the data
backend.public <T extends User> T getUserById(Object id) throws DataBackendException, UnknownEntityException
getUserById in interface UserManagergetUserById in class AbstractUserManagerid - the id of the User.DataBackendException - if there was an error accessing the data
backend.UnknownEntityException - if the user does not exist.Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.