de.kosi.model
Interface User

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
UserImpl

public interface User
extends java.rmi.Remote

The User class represents a User of the system. It contains all neccessairy information about the user.

ChangeLog:

 $Log: User.java,v $
 Revision 1.4  2001/07/17 12:07:27  jiriki
 Fixed bug 440377

 Revision 1.3  2001/07/11 10:06:02  jiriki
 Fixed Bug 440025.

 Revision 1.2  2001/05/09 18:55:21  jiriki
 Removed Bug 422612.

 Revision 1.1.1.1  2001/04/29 18:05:17  jiriki
 Imported sources from zola.

 Revision 1.11  2001/04/17 19:30:08  wombat
 Updated Documentation

 Revision 1.10  2001/04/09 15:36:19  wombat
 Improved UserImpl, removed bugs

 Revision 1.9  2001/03/19 21:50:49  wombat
 - Worked on admin client.
 - improved shutdown sequence
 - removed bugs in login/logout sequence

 Revision 1.8  2001/03/15 22:41:28  wombat
 - Worked on server admin client mockup
 - fixed smaller bugs
 - removed User.getPassword() method (use checkPassword instead)

 Revision 1.7  2001/03/09 11:15:03  wombat
 Updated documentation.

 Revision 1.6  2001/03/08 17:12:27  wombat
 Implemented User database

 Revision 1.5  2001/02/07 16:54:04  wombat
 Updated Documentation

 

Version:
$Revision: 1.4 $ ($Date: 2001/07/17 12:07:27 $)

Field Summary
static int STRENGTH_ADVANCED
          Constant indicating that this user is an advanced bridge player.
static int STRENGTH_BEGINNER
          Constant indicating that this user is just beginning to play Bridge.
static int STRENGTH_PROFESSIONAL
          Constant indicating that this user is a professional bridge player.
 
Method Summary
 boolean checkPassword(java.lang.String password)
          Checks the password.
 Conventions getConventions()
          Returns the Conventions of the user.
 java.lang.String getEMail()
          Returns the e-mail address.
 java.util.Locale getLocale()
          Returns the locale.
 java.lang.String getLoginName()
          Returns the loginname of the user.
 int getStrength()
          Returns the strength of the user.
 java.util.TimeZone getTimeZone()
          Returns the time zone.
 void setEMail(java.lang.String email)
          Sets the e-mail address.
 void setLocale(java.util.Locale locale)
          Sets the locale of the user.
 void setPassword(java.lang.String password, java.lang.String oldPassword)
          Sets the password.
 void setStrength(int strength)
          Set the strength of the user.
 void setTimeZone(java.util.TimeZone timeZone)
          Sets the time zone of the user.
 

Field Detail

STRENGTH_BEGINNER

public static final int STRENGTH_BEGINNER
Constant indicating that this user is just beginning to play Bridge.

STRENGTH_ADVANCED

public static final int STRENGTH_ADVANCED
Constant indicating that this user is an advanced bridge player.

STRENGTH_PROFESSIONAL

public static final int STRENGTH_PROFESSIONAL
Constant indicating that this user is a professional bridge player.
Method Detail

getLoginName

public java.lang.String getLoginName()
                              throws java.rmi.RemoteException
Returns the loginname of the user. This String has to be unique within the system.
Returns:
loginname of the user.
Throws:
java.rmi.RemoteException - if the remote call fails.

setPassword

public void setPassword(java.lang.String password,
                        java.lang.String oldPassword)
                 throws java.rmi.RemoteException,
                        KosiAccessException,
                        InvalidSessionException,
                        PasswordException
Sets the password.
Parameters:
password - The new password.
oldPassword - Old password used to verify the user.
Throws:
java.rmi.RemoteException - if the remote call fails.
KosiAccessException - if not called by the user himself or an admin.
InvalidSessionException - If not called from a valid session context.
PasswordException - If not able to set the password.

checkPassword

public boolean checkPassword(java.lang.String password)
                      throws java.rmi.RemoteException,
                             KosiAccessException
Checks the password.
Parameters:
password - The password.
Returns:
true if password is correct.
Throws:
java.rmi.RemoteException - if the remote call fails.
KosiAccessException - if not called by the user himself or an admin.

setEMail

public void setEMail(java.lang.String email)
              throws java.rmi.RemoteException,
                     KosiAccessException,
                     InvalidSessionException
Sets the e-mail address.
Parameters:
email - the new e-mail address.
Throws:
java.rmi.RemoteException - if the remote call fails.
KosiAccessException - if not called by the user himself or an admin.
InvalidSessionException - If not called from a valid session context.

getEMail

public java.lang.String getEMail()
                          throws KosiAccessException,
                                 InvalidSessionException,
                                 java.rmi.RemoteException
Returns the e-mail address.
Returns:
The e-mail address.
Throws:
java.rmi.RemoteException - if the remote call fails.
InvalidSessionException - If not called from a valid session context.
KosiAccessException - if not called by the user himself or an admin.

setLocale

public void setLocale(java.util.Locale locale)
               throws java.rmi.RemoteException,
                      KosiAccessException,
                      InvalidSessionException
Sets the locale of the user. The locale can be used to format dates etc.
Parameters:
locale - The new Locale.
Throws:
java.rmi.RemoteException - If the remote call fails.
KosiAccessException - If not called by the user himself or an admin.
InvalidSessionException - If not called from a valid session context.

getLocale

public java.util.Locale getLocale()
                           throws java.rmi.RemoteException
Returns the locale.
Returns:
The locale.
Throws:
java.rmi.RemoteException - if the remote call fails.

setTimeZone

public void setTimeZone(java.util.TimeZone timeZone)
                 throws java.rmi.RemoteException,
                        KosiAccessException,
                        InvalidSessionException
Sets the time zone of the user.
Parameters:
timeZone - th.
Throws:
java.rmi.RemoteException - if the remote call fails.
KosiAccessException - if not called by the user himself or an admin.
InvalidSessionException - when not called from within a valid session context.

getTimeZone

public java.util.TimeZone getTimeZone()
                               throws java.rmi.RemoteException
Returns the time zone.
Returns:
The time zone.
Throws:
java.rmi.RemoteException - if the remote call fails.

getStrength

public int getStrength()
                throws java.rmi.RemoteException
Returns the strength of the user.
Returns:
One of the STRENGTH_* constants.
Throws:
java.rmi.RemoteException - if the remote call fails.

setStrength

public void setStrength(int strength)
                 throws java.rmi.RemoteException,
                        KosiAccessException,
                        InvalidSessionException
Set the strength of the user.
Parameters:
strength - One of the STRENGTH_* constants.
Throws:
java.rmi.RemoteException - if the remote call fails.
KosiAccessException - if not called by the user himself or an admin.
InvalidSessionException - If not called from a valid session context.

getConventions

public Conventions getConventions()
                           throws java.rmi.RemoteException
Returns the Conventions of the user.
Returns:
Conventions of the user.
Throws:
java.rmi.RemoteException - if the remote call fails.