|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PunchDB
represents a database for holding PunchData objects.
PunchData,
PunchDataAnalyzer| Method Summary | |
|---|---|
void |
addPunchListener(PunchListener listener)
registers a listener for calls of punch(PunchData) |
PunchData |
getFirstPunch(User user)
if user is null, the first punch of all is returned. |
PunchData |
getLastPunch(User user)
if user is null, the last punch of all is returned. |
PunchDataAnalyzer |
getPunchData(User user,
Date from,
Date until,
String location,
String activity)
retrieves the relevant set of Punchdata objects in a PunchDataAnalyzer |
Map<Object,TimeUser> |
getUsers()
returns an unmodifiable view of the users, mapping the id to a TimeUser |
void |
punch(PunchData entry)
performs consistency check before adding the entry. |
void |
updatePassword(User user)
updates the permanent storage with the password that is now present in the user |
| Method Detail |
|---|
void addPunchListener(PunchListener listener)
punch(PunchData)
punch(PunchData)
void punch(PunchData entry)
throws DatabaseException,
FormatException
FormatException - if the employee is already checked in/out,
or if there is a punch that occured thereafter,
or if the first punch for the user is a checkout.
DatabaseExceptionaddPunchListener(PunchListener),
PunchDataAnalyzer.verifyPunch(PunchDB, PunchData)
PunchDataAnalyzer getPunchData(User user,
Date from,
Date until,
String location,
String activity)
throws DatabaseException
user - limits retrieval by employee; if null, this limit does not applyfrom - limits retrieval by begin date; if null, this limit does not applyuntil - limits retrieval by end date; if null, this limit does not apply
DatabaseExceptionPunchData
PunchData getLastPunch(User user)
throws DatabaseException
DatabaseException
PunchData getFirstPunch(User user)
throws DatabaseException
DatabaseException
Map<Object,TimeUser> getUsers()
throws DatabaseException
DatabaseException
void updatePassword(User user)
throws DatabaseException
DatabaseExceptionUserImpl.setPassword(char[]),
UserImpl.getPasswordHash()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||