cafe.main
Class MainFingerprintHandler

java.lang.Object
  extended by cafe.main.MainFingerprintHandler
All Implemented Interfaces:
FingerprintEvent

public class MainFingerprintHandler
extends java.lang.Object
implements FingerprintEvent

This class connects FingerprintAuthentication with Database and GUI.

Version:
0.2
Author:
Markus Penttil�

Constructor Summary
MainFingerprintHandler(UserInterface gui, Database db, CoffeeTouch main)
          Constructs a new instance of this class and stores the references to other components.
 
Method Summary
 boolean authenticatedFingerprint(int id)
          Used to inform the system that a fingerprint has been recognized.
 FPData[] getFingerprintData()
          Used to fetch all fingerprints from the database.
 void unAuthenticatedFingerprint(FPData data)
          Used to inform the system that a fingerprint was read, but not recognized.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainFingerprintHandler

public MainFingerprintHandler(UserInterface gui,
                              Database db,
                              CoffeeTouch main)
Constructs a new instance of this class and stores the references to other components.

Parameters:
gui - reference to GUI component
db - reference to Database component
main - reference to CoffeeTouch
Method Detail

authenticatedFingerprint

public boolean authenticatedFingerprint(int id)
Description copied from interface: FingerprintEvent
Used to inform the system that a fingerprint has been recognized.

Specified by:
authenticatedFingerprint in interface FingerprintEvent
Parameters:
id - the id number of the recognized fingerprint
Returns:
true if the fingerprint should be kept in cache. false if it should be deleted (i.e. has been deleted from the database).

getFingerprintData

public FPData[] getFingerprintData()
Description copied from interface: FingerprintEvent
Used to fetch all fingerprints from the database.

Specified by:
getFingerprintData in interface FingerprintEvent
Returns:
a list of FPData instances containing all fingerprint data in the database

unAuthenticatedFingerprint

public void unAuthenticatedFingerprint(FPData data)
Description copied from interface: FingerprintEvent
Used to inform the system that a fingerprint was read, but not recognized.

Specified by:
unAuthenticatedFingerprint in interface FingerprintEvent
Parameters:
data - FPData containing the fingerprint's data