org.rapla.facade
Interface UserModule

All Known Subinterfaces:
ClientFacade

public interface UserModule

Encapsulates the methods responsible for authentification.

Version:
CVS $Revision: 1.22 $ $Date: 2006/01/08 14:43:14 $

Method Summary
 boolean canChangePassword()
           
 boolean canSwitchBack()
          returns true if the admin has switched to anoter user!
 void changePassword(User user, char[] oldPassword, char[] newPassword)
           
 User getUser()
          throws an Exception if no user has loged in.
 boolean isSessionActive()
          returns if a session is active.
 boolean login(String username, char[] password)
          The login method establishes the connection and loads data.
 void logout()
          logout of the current user
 void switchTo(User user)
          the admin can switch to another user!
 

Method Detail

login

boolean login(String username,
              char[] password)
              throws RaplaException
The login method establishes the connection and loads data. It should clear the password char array.

Returns:
false on an invalid login.
Throws:
RaplaException - if the connection can't be established.

logout

void logout()
            throws RaplaException
logout of the current user

Throws:
RaplaException

isSessionActive

boolean isSessionActive()
returns if a session is active. True between a successful login and logout.


getUser

User getUser()
             throws RaplaException
throws an Exception if no user has loged in.

Returns:
the user that has loged in.
Throws:
RaplaException

switchTo

void switchTo(User user)
the admin can switch to another user!


canSwitchBack

boolean canSwitchBack()
returns true if the admin has switched to anoter user!


changePassword

void changePassword(User user,
                    char[] oldPassword,
                    char[] newPassword)
                    throws RaplaException
Throws:
RaplaException

canChangePassword

boolean canChangePassword()


Copyright © 2000-2006 Rapla Team. All Rights Reseserved.