public class HibernateUserManagerImpl extends AbstractUserManager
manager
ROLE
Constructor and Description |
---|
HibernateUserManagerImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkExists(String userName)
Check whether a specified user's account exists.
|
UserSet |
getAllUsers()
Retrieves all users defined in the system.
|
PersistenceHelper |
getPersistenceHelper() |
User |
getUser(String userName)
Retrieve a user from persistent storage using username as the key.
|
User |
getUserById(Object id)
Retrieve a User object with specified id.
|
User |
persistNewUser(User 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, getUserInstance
configure, getClassName, setClassName
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, service
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 User getUser(String userName) throws UnknownEntityException, DataBackendException
getUser
in interface UserManager
getUser
in class AbstractUserManager
userName
- 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 UserSet getAllUsers() throws DataBackendException
DataBackendException
- if there was an error accessing the data backend.public 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.public User persistNewUser(User user) throws DataBackendException
persistNewUser
in class AbstractUserManager
user
- 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 void saveUser(User user) throws DataBackendException, UnknownEntityException
role
- The User to be stored.DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the role does not exist.public PersistenceHelper getPersistenceHelper()
public User getUserById(Object id) throws DataBackendException, UnknownEntityException
getUserById
in interface UserManager
getUserById
in class AbstractUserManager
id
- the id of the User.DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the user does not exist.Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.