public class UserManagerImpl extends UniversalManagerImpl implements UserManager, UserService
log
Constructor and Description |
---|
UserManagerImpl() |
Modifier and Type | Method and Description |
---|---|
User |
getUser(String userId)
Retrieves a user by userId.
|
User |
getUserByUsername(String username)
Finds a user by their username.
|
List<User> |
getUsers(User user)
Retrieves a list of users, filtering with parameters on a user object
|
void |
removeUser(String userId)
Removes a user from the database by their userId
|
User |
saveUser(User user)
Saves a user's information
|
void |
setUserDao(UserDao dao)
Set the Dao for communication with the data layer.
|
get, getAll, remove, save, setDao
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getAll, remove, save
public void setUserDao(UserDao dao)
setUserDao
in interface UserManager
dao
- the UserDao that communicates with the databasepublic User getUser(String userId)
getUser
in interface UserManager
getUser
in interface UserService
userId
- the identifier for the userpublic List<User> getUsers(User user)
getUsers
in interface UserManager
getUsers
in interface UserService
user
- parameters to filter on@Transactional public User saveUser(User user) throws UserExistsException
saveUser
in interface UserManager
saveUser
in interface UserService
user
- the user's informationUserExistsException
- thrown when user already existspublic void removeUser(String userId)
removeUser
in interface UserManager
removeUser
in interface UserService
userId
- the user's idpublic User getUserByUsername(String username) throws org.springframework.security.userdetails.UsernameNotFoundException
getUserByUsername
in interface UserManager
getUserByUsername
in interface UserService
username
- the login name of the humanorg.springframework.security.userdetails.UsernameNotFoundException
- thrown when username not foundCopyright © 2015. All rights reserved.