@Service(value="userManager") public class UserManagerImpl extends GenericManagerImpl<org.appfuse.model.User,Long> implements UserManager, UserService
dao, log| Constructor and Description |
|---|
UserManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.appfuse.model.User |
getUser(String userId)
Retrieves a user by userId.
|
org.appfuse.model.User |
getUserByUsername(String username)
Finds a user by their username.
|
List<org.appfuse.model.User> |
getUsers()
Retrieves a list of all users.
|
void |
removeUser(String userId)
Removes a user from the database by their userId
|
void |
removeUser(org.appfuse.model.User user)
Removes a user from the database
|
org.appfuse.model.User |
saveUser(org.appfuse.model.User user)
Saves a user's information.
|
List<org.appfuse.model.User> |
search(String searchTerm)
Search a user for search terms.
|
void |
setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder) |
void |
setUserDao(UserDao userDao)
Convenience method for testing - allows you to mock the DAO and set it on an interface.
|
exists, get, getAll, reindex, reindexAll, remove, remove, save, searchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexists, get, getAll, reindex, reindexAll, remove, remove, save, search@Autowired public void setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
@Autowired public void setUserDao(UserDao userDao)
UserManagersetUserDao in interface UserManageruserDao - the UserDao implementation to usepublic org.appfuse.model.User getUser(String userId)
getUser in interface UserManagergetUser in interface UserServiceuserId - the identifier for the userpublic List<org.appfuse.model.User> getUsers()
getUsers in interface UserManagergetUsers in interface UserServicepublic org.appfuse.model.User saveUser(org.appfuse.model.User user)
throws UserExistsException
saveUser in interface UserManagersaveUser in interface UserServiceuser - the user's informationUserExistsException - thrown when user already existspublic void removeUser(org.appfuse.model.User user)
removeUser in interface UserManageruser - the user to removepublic void removeUser(String userId)
removeUser in interface UserManagerremoveUser in interface UserServiceuserId - the user's idpublic org.appfuse.model.User getUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
getUserByUsername in interface UserManagergetUserByUsername in interface UserServiceusername - the login name of the humanorg.springframework.security.core.userdetails.UsernameNotFoundException - thrown when username not foundpublic List<org.appfuse.model.User> search(String searchTerm)
search in interface UserManagersearchTerm - the search terms.Copyright © 2003-2012. All Rights Reserved.