Package com.easydesk.security.entity
Interface UserManager
- All Superinterfaces:
SecurityEntityManager<User,,Long> Serializable
- All Known Implementing Classes:
ModuleUserManagerAdaptor,UserManagerAdaptor
An UserManager performs
User objects
related tasks
The responsibilities of this class include loading data of an user from the
storage and putting them into the User
objects, saving those data to the permanent storage, and authenticating
users.
- Version:
- $Id$
- Author:
- Youngho Cho
-
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(User user, String password) Authenticate an User with the specified password.voidchangePassword(User user, String oldPassword, String newPassword) Change the password for an User.voidforcePassword(User user, String password) Forcibly sets new password for an User.<T extends EasyDeskAccessControlList<T>>
TReturn the system's chosen implementation of ACL interface for the user.retrieveUserList(Object criteria) Retrieve a list of users that meet the specified criteria.voidSaves User's data in the permanent storage.Methods inherited from interface com.easydesk.security.entity.SecurityEntityManager
add, exists, exists, getByName, getInstance, getInstance, remove, rename
-
Method Details
-
retrieveUserList
Retrieve a list of users that meet the specified criteria.- Type Parameters:
T- User type- Parameters:
criteria- The criteria of selection.- Returns:
- a List of users meeting the criteria.
- Throws:
DataBackendException- if there is a problem accessing the storage.
-
saveUser
Saves User's data in the permanent storage. The user account is required to exist in the storage.- Parameters:
user- the user object to save- Throws:
UnknownEntityException- if the user's account does not exist in the database.DataBackendException- if there is a problem accessing the storage.
-
authenticate
void authenticate(User user, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException Authenticate an User with the specified password. If authentication is successful the method returns nothing. If there are any problems, exception was thrown.- Parameters:
user- an User object to authenticate.password- the user supplied password.- Throws:
PasswordMismatchException- if the supplied password was incorrect.UnknownEntityException- if the user's record does not exist in the database.DataBackendException- if there is a problem accessing the storage.
-
changePassword
void changePassword(User user, String oldPassword, String newPassword) throws PasswordMismatchException, UnknownEntityException, DataBackendException Change the password for an User.- Parameters:
user- an User to change password for.oldPassword- the current password suplied by the user.newPassword- the new password requested by the user.- Throws:
PasswordMismatchException- if the supplied password was incorrect.UnknownEntityException- if the user's record does not exist in the database.DataBackendException- if there is a problem accessing the storage.
-
forcePassword
Forcibly sets new password for an User.This is supposed by the administrator to change the forgotten or compromised passwords. Certain implementatations of this feature would require administrative level access to the authenticating server / program.
- Parameters:
user- an User to change password for.password- the new password.- Throws:
UnknownEntityException- if the user's record does not exist in the database.DataBackendException- if there is a problem accessing the storage.
-
getACL
Return the system's chosen implementation of ACL interface for the user.- Type Parameters:
T- AccessControlList type- Parameters:
user- the user- Returns:
- systems's chosen implementation of ACL interface.
- Throws:
UnknownEntityException- if the implementation of ACL interface could not be determined, or does not exist.
-