public abstract class AbstractUserManager extends AbstractEntityManager implements UserManager
ROLE| Constructor and Description |
|---|
AbstractUserManager() |
| Modifier and Type | Method and Description |
|---|---|
<T extends User> |
addUser(T user,
String password)
Creates new user account with specified attributes.
|
void |
authenticate(User user,
String password)
Authenticate an User with the specified password.
|
void |
changePassword(User user,
String oldPassword,
String newPassword)
Change the password for an User.
|
boolean |
checkExists(User user)
Check whether a specified user's account exists.
|
void |
forcePassword(User user,
String password)
Forcibly sets new password for an User.
|
<T extends AccessControlList> |
getACL(User user)
Return a Class object representing the system's chosen implementation of
of ACL interface.
|
ACLFactory |
getACLFactory() |
<T extends User> |
getUser(String name)
Retrieve a user from persistent storage using username as the key.
|
<T extends User> |
getUser(String userName,
String password)
Retrieve a user from persistent storage using username as the key, and
authenticate the user.
|
<T extends User> |
getUserById(Object id)
Retrieve a User object with specified Id.
|
<T extends User> |
getUserInstance()
Construct a blank User object.
|
<T extends User> |
getUserInstance(String userName)
Construct a blank User object.
|
protected abstract <T extends User> |
persistNewUser(T user) |
configure, getClassName, setClassNamedispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, serviceenableLogging, getLogger, setupLogger, setupLogger, setupLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckExists, getAllUsers, removeUser, saveUserprotected abstract <T extends User> T persistNewUser(T user) throws DataBackendException
DataBackendExceptionpublic <T extends AccessControlList> T getACL(User user) throws UnknownEntityException
UserManagergetACL in interface UserManagerUnknownEntityException - if the implementation of ACL interface could not be
determined, or does not exist.public boolean checkExists(User user) throws DataBackendException
checkExists in interface UserManageruser - The user to be checked.DataBackendException - if there was an error accessing the data backend.public <T extends User> T getUser(String userName, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException
getUser in interface UserManageruserName - the name of the user.password - the user supplied password.PasswordMismatchException - if the supplied password was incorrect.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> T getUser(String name) throws DataBackendException, UnknownEntityException
UserManagergetUser in interface UserManagername - the name of the user.DataBackendException - if there is a problem accessing the storage.UnknownEntityException - if the user's record does not exist in the database.public <T extends User> T getUserById(Object id) throws DataBackendException, UnknownEntityException
getUserById in interface UserManagerid - the id of the User.UnknownEntityException - if the user does not exist in the database.DataBackendException - if there is a problem accessing the storage.public void authenticate(User user, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException
authenticate in interface UserManageruser - an User object to authenticate.password - the user supplied password.PasswordMismatchException - if the supplied password was incorrect.UnknownEntityException - if the user's account does not exist in the database.DataBackendException - if there is a problem accessing the storage.public void changePassword(User user, String oldPassword, String newPassword) throws PasswordMismatchException, UnknownEntityException, DataBackendException
changePassword in interface UserManageruser - an User to change password for.oldPassword - The old password to verifynewPassword - The new password to setPasswordMismatchException - if the supplied password was incorrect.UnknownEntityException - if the user's account does not exist in the database.DataBackendException - if there is a problem accessing the storage.public void forcePassword(User user, String password) throws UnknownEntityException, DataBackendException
forcePassword in interface UserManageruser - an User to change password for.password - the new password.UnknownEntityException - if the user's record does not exist in the database.DataBackendException - if there is a problem accessing the storage.public <T extends User> T getUserInstance() throws DataBackendException
getUserInstance in interface UserManagerDataBackendException - if the object could not be instantiated.public <T extends User> T getUserInstance(String userName) throws DataBackendException
getUserInstance in interface UserManageruserName - The name of the user.DataBackendException - if the object could not be instantiated.public <T extends User> T addUser(T user, String password) throws DataBackendException, EntityExistsException
addUser in interface UserManageruser - the object describing account to be created.password - The password to use for the account.DataBackendException - if there was an error accessing the data backend.EntityExistsException - if the user account already exists.public ACLFactory getACLFactory()
Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.