01: package de.webman.acl.eventhandler;
02:
03: import java.util.*;
04:
05: import com.teamkonzept.web.*;
06: import com.teamkonzept.lib.*;
07: import com.teamkonzept.webman.WebManEvent;
08: import com.teamkonzept.webman.mainint.*;
09: import com.teamkonzept.webman.mainint.events.*;
10: import de.webman.acl.*;
11:
12: /**
13: Displays a Report of all Tasks
14: * @author $Author: mischa $
15: * @version $Revision: 1.2 $
16: */
17: public class ACUserReportEventHandler extends DefaultEventHandler
18: implements ParameterTypes, DatabaseDefaults, FrameConstants {
19: private ACUserReportEventHandler() {
20: }
21:
22: private static ACUserReportEventHandler instance = new ACUserReportEventHandler();
23:
24: public static ACUserReportEventHandler getInstance() {
25: return instance;
26: }
27:
28: public void handleEvent(TKEvent evt) throws TKException {
29: try {
30: TKHTMLTemplate t = evt
31: .getPrepHTMLTemplate("ac_userreport.tmpl");
32: TKHashtable userHash = ACReports.makeUserReport(UserFactory
33: .getInstance().getUsers());
34: //WebManEvent.fillEventsIntoTemplate(evt, t, ACCESS_CONTROL );
35: t.setListIterator(new TKStandardPluginIterator(
36: "USER_REPORT", null, userHash, true, t
37: .getListIterator()));
38: t.set("RTARGET", RIGHT_TARGET);
39: evt.finishTemplate(t);
40: } catch (Throwable e) {
41: throw WebmanExceptionHandler.getException(e);
42: }
43: }
44:
45: public boolean isHandler(TKEvent evt) {
46: return evt.getName().equalsIgnoreCase("AC_USER_REPORT");
47: }
48:
49: }
|