org.appfuse.service.impl
Class UserManagerImpl

java.lang.Object
  extended by org.appfuse.service.impl.UniversalManagerImpl
      extended by org.appfuse.service.impl.UserManagerImpl
All Implemented Interfaces:
UniversalManager, UserManager, UserService

public class UserManagerImpl
extends UniversalManagerImpl
implements UserManager, UserService

Implementation of UserManager interface.

Author:
Matt Raible

Field Summary
 
Fields inherited from class org.appfuse.service.impl.UniversalManagerImpl
log
 
Constructor Summary
UserManagerImpl()
           
 
Method Summary
 org.appfuse.model.User getUser(java.lang.String userId)
          Retrieves a user by userId.
 org.appfuse.model.User getUserByUsername(java.lang.String username)
          Finds a user by their username.
 java.util.List<org.appfuse.model.User> getUsers(org.appfuse.model.User user)
          Retrieves a list of users, filtering with parameters on a user object
 void removeUser(java.lang.String userId)
          Removes a user from the database by their userId
 org.appfuse.model.User saveUser(org.appfuse.model.User user)
          Saves a user's information
 void setUserDao(org.appfuse.dao.UserDao dao)
          Set the Dao for communication with the data layer.
 
Methods inherited from class org.appfuse.service.impl.UniversalManagerImpl
get, getAll, remove, save, setDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.appfuse.service.UniversalManager
get, getAll, remove, save
 

Constructor Detail

UserManagerImpl

public UserManagerImpl()
Method Detail

setUserDao

public void setUserDao(org.appfuse.dao.UserDao dao)
Set the Dao for communication with the data layer.

Specified by:
setUserDao in interface UserManager
Parameters:
dao - the UserDao that communicates with the database

getUser

public org.appfuse.model.User getUser(java.lang.String userId)
Description copied from interface: UserManager
Retrieves a user by userId. An exception is thrown if user not found

Specified by:
getUser in interface UserManager
Specified by:
getUser in interface UserService
Parameters:
userId - the identifier for the user
Returns:
User
See Also:
UserManager.getUser(java.lang.String)

getUsers

public java.util.List<org.appfuse.model.User> getUsers(org.appfuse.model.User user)
Description copied from interface: UserManager
Retrieves a list of users, filtering with parameters on a user object

Specified by:
getUsers in interface UserManager
Specified by:
getUsers in interface UserService
Parameters:
user - parameters to filter on
Returns:
List
See Also:
UserManager.getUsers(org.appfuse.model.User)

saveUser

public org.appfuse.model.User saveUser(org.appfuse.model.User user)
                                throws UserExistsException
Description copied from interface: UserManager
Saves a user's information

Specified by:
saveUser in interface UserManager
Specified by:
saveUser in interface UserService
Parameters:
user - the user's information
Returns:
updated user
Throws:
UserExistsException - thrown when user already exists
See Also:
UserManager.saveUser(org.appfuse.model.User)

removeUser

public void removeUser(java.lang.String userId)
Description copied from interface: UserManager
Removes a user from the database by their userId

Specified by:
removeUser in interface UserManager
Specified by:
removeUser in interface UserService
Parameters:
userId - the user's id
See Also:
UserManager.removeUser(java.lang.String)

getUserByUsername

public org.appfuse.model.User getUserByUsername(java.lang.String username)
                                         throws org.acegisecurity.userdetails.UsernameNotFoundException
Description copied from interface: UserManager
Finds a user by their username.

Specified by:
getUserByUsername in interface UserManager
Specified by:
getUserByUsername in interface UserService
Parameters:
username - the user's username used to login
Returns:
User a populated user object
Throws:
org.acegisecurity.userdetails.UsernameNotFoundException - exception thrown when user not found


Copyright © 2003-2007. All Rights Reserved.