org.appfuse.service
Class UserManagerImpl

java.lang.Object
  extended byorg.appfuse.service.BaseManager
      extended byorg.appfuse.service.UserManagerImpl
All Implemented Interfaces:
UserManager

public class UserManagerImpl
extends BaseManager
implements UserManager

Implementation of UserManager interface. This basically transforms POJOs -> Forms and back again.

View Source

Version:
$Revision: 1.1 $ $Date: 2004/03/31 13:04:17 $
Author:
Matt Raible

Constructor Summary
UserManagerImpl()
           
 
Method Summary
 String checkLoginCookie(String value)
          Validates a user based on a cookie value.
 String createLoginCookie(String username)
          Creates a cookie string using a username - designed for use when a user logs in and wants to be remembered.
 Object getUser(String username)
          Retrieves a user by name, and can create a new one
 List getUsers(Object obj)
          Retrieves a list of users, filtering with parameters on a user object
 void removeLoginCookies(String username)
          Deletes all cookies for user.
 void removeUser(Object obj)
          Removes a user from the database by id
 Object saveUser(Object obj)
          Saves a user's information
 void setUserDAO(UserDAO dao)
          Set the DAO for communication with the data layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManagerImpl

public UserManagerImpl()
Method Detail

setUserDAO

public void setUserDAO(UserDAO dao)
Set the DAO for communication with the data layer.

Parameters:
dao -

getUser

public Object getUser(String username)
               throws Exception
Description copied from interface: UserManager
Retrieves a user by name, and can create a new one

Specified by:
getUser in interface UserManager
Parameters:
username -
Returns:
User
Throws:
Exception
See Also:
UserManager.getUser(java.lang.String)

getUsers

public List getUsers(Object obj)
              throws Exception
Description copied from interface: UserManager
Retrieves a list of users, filtering with parameters on a user object

Specified by:
getUsers in interface UserManager
Parameters:
obj - parameters to filter on
Returns:
List
Throws:
Exception
See Also:
UserManager.getUsers(java.lang.Object)

saveUser

public Object saveUser(Object obj)
                throws Exception
Description copied from interface: UserManager
Saves a user's information

Specified by:
saveUser in interface UserManager
Parameters:
obj - the user's information
Returns:
updated user information
Throws:
Exception
See Also:
UserManager.saveUser(java.lang.Object)

removeUser

public void removeUser(Object obj)
                throws Exception
Description copied from interface: UserManager
Removes a user from the database by id

Specified by:
removeUser in interface UserManager
Throws:
Exception
See Also:
UserManager.removeUser(java.lang.Object)

checkLoginCookie

public String checkLoginCookie(String value)
                        throws Exception
Description copied from interface: UserManager
Validates a user based on a cookie value. If successfull, it returns a new cookie String. If not, then it returns null.

Specified by:
checkLoginCookie in interface UserManager
Parameters:
value - (in format username|guid)
Returns:
indicator that this is a valid login
Throws:
Exception
See Also:
UserManager.checkLoginCookie(java.lang.String)

createLoginCookie

public String createLoginCookie(String username)
                         throws Exception
Description copied from interface: UserManager
Creates a cookie string using a username - designed for use when a user logs in and wants to be remembered.

Specified by:
createLoginCookie in interface UserManager
Parameters:
username -
Returns:
String to put in a cookie for remembering user
Throws:
Exception
See Also:
UserManager.createLoginCookie(java.lang.String)

removeLoginCookies

public void removeLoginCookies(String username)
Description copied from interface: UserManager
Deletes all cookies for user.

Specified by:
removeLoginCookies in interface UserManager
Parameters:
username -
See Also:
UserManager.removeLoginCookies(java.lang.String)


Copyright © 2002-2004