01: package de.webman.acl;
02:
03: import com.teamkonzept.lib.TKException;
04: import com.teamkonzept.lib.TKVector;
05: import de.webman.acl.db.EventDBData;
06:
07: /**
08: * An event is a trigger for an atomic operation in WebMan.
09: *
10: * @version 1.0
11: * @since 1.0
12: * @author © 2001 Webman AG
13: */
14: public class Event extends WMObject {
15:
16: // $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/Event.java,v 1.1 2001/08/20 08:25:07 mischa Exp $
17:
18: // Attributes
19:
20: /**
21: * The name of the event.
22: */
23: private String name = null;
24:
25: // Constructors
26:
27: /**
28: * Provide instantion only to package classes or subclasses.
29: *
30: * @param data the initial event data.
31: */
32: protected Event(EventDBData data) {
33: super (data);
34:
35: this .name = data.getName();
36: }
37:
38: // Method implementations
39:
40: /**
41: * Returns the factory of the object.
42: *
43: * @return the factory of the object.
44: * @exception com.teamkonzept.lib.TKException if an error occured during factory retrieval.
45: */
46: public final ObjectFactory getFactory() throws TKException {
47: return EventFactory.getInstance();
48: }
49:
50: /**
51: * Returns the name of the event.
52: *
53: * @return the name of the event.
54: */
55: public final String getName() {
56: return name;
57: }
58:
59: /**
60: * Assigns the name of the event.
61: *
62: * @param name the name of the event.
63: */
64: public final void setName(String name) {
65: super .modifyAttribute(this .name, name);
66: this .name = name;
67: }
68:
69: /**
70: * Returns all actions referencing the event.
71: *
72: * @return all actions referencing the event.
73: * @exception com.teamkonzept.lib.TKException if an error occured during action retrieval.
74: */
75: public final TKVector getActions() throws TKException {
76: return ActionFactory.getInstance().getActions(this);
77: }
78:
79: }
|