|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.timeregister.RemotePunchDBClient
public class RemotePunchDBClient
wraps a RemotePunchDB by delegating all requests to it. This way, a client application can transparently work with a PunchDB.
| Constructor Summary | |
|---|---|
RemotePunchDBClient(RemotePunchDB remoteDB)
|
|
| Method Summary | |
|---|---|
void |
addPunchListener(PunchListener listener)
registers a listener for calls of punch(PunchData) |
void |
close()
empty implementation |
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 |
PunchListener[] |
getPunchListeners()
|
static RemotePunchDB |
getRemoteObject(String server)
|
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 |
removeListener(PunchListener listener)
|
void |
updatePassword(User user)
updates the permanent storage with the password that is now present in the user |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemotePunchDBClient(RemotePunchDB remoteDB)
| Method Detail |
|---|
public void close()
public void addPunchListener(PunchListener listener)
PunchDBpunch(PunchData)
addPunchListener in interface PunchDBPunchDB.punch(PunchData)public void removeListener(PunchListener listener)
public PunchListener[] getPunchListeners()
public void punch(PunchData entry)
throws DatabaseException,
FormatException
PunchDB
punch in interface PunchDBFormatException - 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.
DatabaseExceptionPunchDB.addPunchListener(PunchListener),
PunchDataAnalyzer.verifyPunch(PunchDB, PunchData)
public PunchDataAnalyzer getPunchData(User user,
Date from,
Date until,
String location,
String activity)
throws DatabaseException
PunchDB
getPunchData in interface PunchDBuser - 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
public PunchData getLastPunch(User user)
throws DatabaseException
PunchDB
getLastPunch in interface PunchDBDatabaseException
public PunchData getFirstPunch(User user)
throws DatabaseException
PunchDB
getFirstPunch in interface PunchDBDatabaseException
public Map<Object,TimeUser> getUsers()
throws DatabaseException
PunchDB
getUsers in interface PunchDBDatabaseException
public void updatePassword(User user)
throws DatabaseException,
IllegalArgumentException
PunchDB
updatePassword in interface PunchDBDatabaseException
IllegalArgumentExceptionUserImpl.setPassword(char[]),
UserImpl.getPasswordHash()
public static RemotePunchDB getRemoteObject(String server)
throws NotBoundException,
RemoteException,
AccessException,
MalformedURLException
NotBoundException
RemoteException
AccessException
MalformedURLException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||