org.demosys.web.user.impl
Class MemoryUserService

java.lang.Object
  |
  +--org.demosys.web.user.impl.MemoryUserService
All Implemented Interfaces:
UserService

public class MemoryUserService
extends java.lang.Object
implements UserService

Implementation of a UserService in memory.


Constructor Summary
MemoryUserService()
           
 
Method Summary
 void deleteUser(java.lang.String id)
          Delete a user by its ID.
 org.demosys.web.user.UserViewList getAllUsers()
          Retrieve all defined user.
 org.demosys.web.user.UserView getUser(java.lang.String id)
          Retrieve a user by its ID.
 void newUser(org.demosys.web.user.UserView user)
          Create a new User in the persistence layer.
 void updateUser(org.demosys.web.user.UserView user)
          Update the user data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryUserService

public MemoryUserService()
Method Detail

newUser

public void newUser(org.demosys.web.user.UserView user)
             throws InvalidUserException,
                    DuplicateUserException
Description copied from interface: UserService
Create a new User in the persistence layer.

Specified by:
newUser in interface UserService
Parameters:
user - a new user
Throws:
InvalidUserException - Failure during creation.
DuplicateUserException

updateUser

public void updateUser(org.demosys.web.user.UserView user)
                throws UnknownUserException,
                       InvalidUserException
Description copied from interface: UserService
Update the user data.

Specified by:
updateUser in interface UserService
Parameters:
user - the view containing the updated data
Throws:
UnknownUserException - User is unknown
InvalidUserException - Failure during update.

deleteUser

public void deleteUser(java.lang.String id)
                throws UnknownUserException
Description copied from interface: UserService
Delete a user by its ID.

Specified by:
deleteUser in interface UserService
Parameters:
id - a user id
Throws:
UnknownUserException - id is an unknown user id.

getUser

public org.demosys.web.user.UserView getUser(java.lang.String id)
                                      throws UnknownUserException
Description copied from interface: UserService
Retrieve a user by its ID.

Specified by:
getUser in interface UserService
Parameters:
id - a user id
Returns:
the user view
Throws:
UnknownUserException - id is an unknown user id.

getAllUsers

public org.demosys.web.user.UserViewList getAllUsers()
Description copied from interface: UserService
Retrieve all defined user.

Specified by:
getAllUsers in interface UserService
Returns:
Users


Copyright © 2003-2004 Sourceforge. All Rights Reserved.