Class SimpleUserManager
java.lang.Object
eu.rarogsoftware.rarog.platform.core.user.management.SimpleUserManager
- All Implemented Interfaces:
UserManager
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleUserManager
(UserStore userStore, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) -
Method Summary
Modifier and TypeMethodDescriptioncreateUser
(StandardUser user) Create a new user with the supplied details.void
deleteUser
(String username) Remove the user with the given login name from the system.Get user for provided idGet user with provided usernamevoid
updatePassword
(long id, String newPassword) Change password of user with provided id.void
updatePassword
(String username, String newPassword) Change password of user with provided username.void
updateUser
(StandardUser user) Update the specified user.boolean
userExists
(Long id) Check if a user with the supplied id exists in the system.boolean
userExists
(String username) Check if a user with the supplied login name exists in the system.
-
Constructor Details
-
SimpleUserManager
public SimpleUserManager(UserStore userStore, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
-
-
Method Details
-
createUser
Description copied from interface:UserManager
Create a new user with the supplied details.- Specified by:
createUser
in interfaceUserManager
- Parameters:
user
- full details of user to create- Returns:
- id of created user
- Throws:
UserManagementException
-
updateUser
Description copied from interface:UserManager
Update the specified user. It gets user by username. Note: password is not updated in this method even if provided. UseUserManager.updatePassword(String, String)
- Specified by:
updateUser
in interfaceUserManager
- Parameters:
user
- full details of user to update- Throws:
UserManagementException
-
updatePassword
Description copied from interface:UserManager
Change password of user with provided username.- Specified by:
updatePassword
in interfaceUserManager
- Parameters:
username
- username of user for password changenewPassword
- not encrypted password- Throws:
UserManagementException
-
updatePassword
Description copied from interface:UserManager
Change password of user with provided id.- Specified by:
updatePassword
in interfaceUserManager
- Parameters:
id
- id of user for password changenewPassword
- not encrypted password- Throws:
UserManagementException
-
getUser
Description copied from interface:UserManager
Get user with provided username- Specified by:
getUser
in interfaceUserManager
- Parameters:
username
- username of user- Returns:
- application user with provided username of null
- Throws:
UserManagementException
-
getUser
Description copied from interface:UserManager
Get user for provided id- Specified by:
getUser
in interfaceUserManager
- Parameters:
id
- id of user- Returns:
- application user for provided id
- Throws:
UserManagementException
-
deleteUser
Description copied from interface:UserManager
Remove the user with the given login name from the system.- Specified by:
deleteUser
in interfaceUserManager
- Parameters:
username
- username of user to remove- Throws:
UserManagementException
-
userExists
Description copied from interface:UserManager
Check if a user with the supplied login name exists in the system.- Specified by:
userExists
in interfaceUserManager
- Parameters:
username
- username to check- Returns:
- true if user exists, false otherwise
-
userExists
Description copied from interface:UserManager
Check if a user with the supplied id exists in the system.- Specified by:
userExists
in interfaceUserManager
- Parameters:
id
- id to check- Returns:
- true if user exists, false otherwise
-