org.appfuse.service
Interface UserManager

All Known Implementing Classes:
UserManagerImpl

public interface UserManager

Business Delegate (Proxy) Interface to handle communication between web and persistence layer.

View Source

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

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 user)
          Retrieves a list of users, filtering with parameters on a user object
 void removeLoginCookies(String username)
          Deletes all cookies for user.
 void removeUser(Object user)
          Removes a user from the database by id
 Object saveUser(Object user)
          Saves a user's information
 

Method Detail

getUser

public Object getUser(String username)
               throws Exception
Retrieves a user by name, and can create a new one

Parameters:
username -
Returns:
User
Throws:
Exception

getUsers

public List getUsers(Object user)
              throws Exception
Retrieves a list of users, filtering with parameters on a user object

Parameters:
user - parameters to filter on
Returns:
List
Throws:
Exception

saveUser

public Object saveUser(Object user)
                throws Exception
Saves a user's information

Parameters:
user - the user's information
Returns:
updated user information
Throws:
Exception

removeUser

public void removeUser(Object user)
                throws Exception
Removes a user from the database by id

Throws:
Exception

checkLoginCookie

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

Parameters:
value - (in format username|guid)
Returns:
indicator that this is a valid login
Throws:
Exception

createLoginCookie

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

Parameters:
username -
Returns:
String to put in a cookie for remembering user
Throws:
Exception

removeLoginCookies

public void removeLoginCookies(String username)
Deletes all cookies for user.

Parameters:
username -


Copyright © 2002-2004