lib.jGroupware.users
Class UserDB

java.lang.Object
  extended bylib.jGroupware.users.UserDB
All Implemented Interfaces:
BeanFactory

public class UserDB
extends java.lang.Object
implements BeanFactory

The main authentication database Provides routines to ensure users can be validated agaist system

Author:
Gareth Webber

Constructor Summary
UserDB()
          Set up internally used maps:
 
Method Summary
 java.lang.Object createBean(int id)
          Method called by Database class during a load Returns a bean for it to populate
 int getNewID(java.sql.Connection mySQLConnection)
          Get an unused ID for use my a new bean Currently never works
 User login(java.sql.Connection mySQLConnection, java.lang.String username, java.lang.String password)
          Login to the system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDB

public UserDB()
Set up internally used maps:

Method Detail

login

public User login(java.sql.Connection mySQLConnection,
                  java.lang.String username,
                  java.lang.String password)
           throws InvalidLoginException
Login to the system

Parameters:
mySQLConnection - Description of the Parameter
username - Username
password - Password
Returns:
Matching User object
Throws:
InvalidLoginException - Indicates login failure

createBean

public java.lang.Object createBean(int id)
Method called by Database class during a load Returns a bean for it to populate

Specified by:
createBean in interface BeanFactory
Parameters:
id - Id passed into new bean
Returns:
New Contact bean

getNewID

public int getNewID(java.sql.Connection mySQLConnection)
             throws DatabaseErrorException
Get an unused ID for use my a new bean Currently never works

Specified by:
getNewID in interface BeanFactory
Parameters:
mySQLConnection - Description of the Parameter
Returns:
Unused ID for contact
Throws:
DatabaseErrorException - Thrown if method cannot get a valid ID from the database