Class ModuleUserManagerAdaptor<U extends User>
java.lang.Object
com.easydesk.modules.security.adaptor.ModuleUserManagerAdaptor<U>
- All Implemented Interfaces:
SecurityEntityManager<User,,Long> UserManager,Serializable
@Component
public class ModuleUserManagerAdaptor<U extends User>
extends Object
implements UserManager
UserManagerAdaptor MVC module 안에서만 사용된다.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondatabase 에 존재하지 않는 user 인 경우에만 add 가능하다.voidauthenticate(User user, String password) Authenticate an User with the specified password.voidchangePassword(User user, String oldPassword, String newPassword) Change the password for an User.booleanentity 가 저장소에 존재하는지 확인한다.boolean이름에 해당하는 entity 가 저장소에 존재하는지 확인한다.voidforcePassword(User user, String password) Forcibly sets new password for an User.Return a Class object representing the system's chosen implementation of of ACL interface.User[]이름에 해당하는 entity 를 구한다.Empty User Object 이다.getInstance(Long id) id 에 해당하는 entity 를 구한다.voidentity 를 삭제한다.voidentity 의 이름을 변경한다.retrieveUserList(Object criteria) Retrieves a list of users based on the specified criteria.voidSaves User's data in the permanent storage.
-
Constructor Details
-
ModuleUserManagerAdaptor
-
-
Method Details
-
getInstance
Empty User Object 이다. 주의 : Anonymous User Object 는 EasyDeskUserManager.getAnonymous() 를 사용해야 한다.- Specified by:
getInstancein interfaceSecurityEntityManager<User,Long> - Returns:
- U empty object
-
getInstance
Description copied from interface:SecurityEntityManagerid 에 해당하는 entity 를 구한다.- Specified by:
getInstancein interfaceSecurityEntityManager<User,Long> - Parameters:
id- entity id- Returns:
- T which has id
- Throws:
ExceptionDataBackendException- 저장소 접근 중 오류가 발생한 경우UnknownEntityException- id 에 해당하는 entity 가 없는 경우
-
getByName
Description copied from interface:SecurityEntityManager이름에 해당하는 entity 를 구한다.- Specified by:
getByNamein interfaceSecurityEntityManager<User,Long> - Parameters:
name-- Returns:
- T who's login username is name
- Throws:
DataBackendExceptionUnknownEntityException
-
rename
Description copied from interface:SecurityEntityManagerentity 의 이름을 변경한다.- Specified by:
renamein interfaceSecurityEntityManager<User,Long> - Parameters:
entity-name-- Throws:
DataBackendExceptionUnknownEntityException
-
remove
Description copied from interface:SecurityEntityManagerentity 를 삭제한다.- Specified by:
removein interfaceSecurityEntityManager<User,Long> - Parameters:
entity-- Throws:
DataBackendExceptionUnknownEntityException
-
add
database 에 존재하지 않는 user 인 경우에만 add 가능하다. (user.id 가 EMPTY_ID 인 경우)- Specified by:
addin interfaceSecurityEntityManager<User,Long> - Parameters:
entity-- Returns:
- Throws:
DataBackendExceptionEntityExistsException
-
exists
Description copied from interface:SecurityEntityManagerentity 가 저장소에 존재하는지 확인한다.- Specified by:
existsin interfaceSecurityEntityManager<User,Long> - Parameters:
entity-- Returns:
- Throws:
DataBackendException
-
exists
Description copied from interface:SecurityEntityManager이름에 해당하는 entity 가 저장소에 존재하는지 확인한다.- Specified by:
existsin interfaceSecurityEntityManager<User,Long> - Parameters:
name-- Returns:
- Throws:
DataBackendException
-
retrieveUserList
Retrieves a list of users based on the specified criteria.- Specified by:
retrieveUserListin interfaceUserManager- Type Parameters:
T- User type- Parameters:
criteria- the criteria for filtering users- Returns:
- a set of users matching 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.- Specified by:
saveUserin interfaceUserManager- 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
public 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.- Specified by:
authenticatein interfaceUserManager- Parameters:
user- an User object to authenticate.password- the user supplied password. ( plain text 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
public void changePassword(User user, String oldPassword, String newPassword) throws PasswordMismatchException, UnknownEntityException, DataBackendException Change the password for an User.- Specified by:
changePasswordin interfaceUserManager- Parameters:
user- an User to change password for.oldPassword- the current password suplied by the user. ( plain text password )newPassword- the current password requested by the user. ( plain text 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.
-
forcePassword
public void forcePassword(User user, String password) throws UnknownEntityException, DataBackendException 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.- Specified by:
forcePasswordin interfaceUserManager- Parameters:
user- an User to change password for.password- the new password. ( plain text 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 a Class object representing the system's chosen implementation of of ACL interface.- Specified by:
getACLin interfaceUserManager- 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.
-