KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > acl > Event


1 package de.webman.acl;
2
3 import com.teamkonzept.lib.TKException;
4 import com.teamkonzept.lib.TKVector;
5 import de.webman.acl.db.EventDBData;
6
7 /**
8  * An event is a trigger for an atomic operation in WebMan.
9  *
10  * @version 1.0
11  * @since 1.0
12  * @author © 2001 Webman AG
13  */

14 public class Event
15     extends WMObject
16 {
17
18     // $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/Event.java,v 1.1 2001/08/20 08:25:07 mischa Exp $
19

20     // Attributes
21

22     /**
23      * The name of the event.
24      */

25     private String JavaDoc name = null;
26
27
28     // Constructors
29

30     /**
31      * Provide instantion only to package classes or subclasses.
32      *
33      * @param data the initial event data.
34      */

35     protected Event (EventDBData data)
36     {
37         super(data);
38
39         this.name = data.getName();
40     }
41
42
43     // Method implementations
44

45     /**
46      * Returns the factory of the object.
47      *
48      * @return the factory of the object.
49      * @exception com.teamkonzept.lib.TKException if an error occured during factory retrieval.
50      */

51     public final ObjectFactory getFactory ()
52         throws TKException
53     {
54         return EventFactory.getInstance();
55     }
56
57     /**
58      * Returns the name of the event.
59      *
60      * @return the name of the event.
61      */

62     public final String JavaDoc getName ()
63     {
64         return name;
65     }
66
67     /**
68      * Assigns the name of the event.
69      *
70      * @param name the name of the event.
71      */

72     public final void setName (String JavaDoc name)
73     {
74         super.modifyAttribute(this.name, name);
75         this.name = name;
76     }
77
78     /**
79      * Returns all actions referencing the event.
80      *
81      * @return all actions referencing the event.
82      * @exception com.teamkonzept.lib.TKException if an error occured during action retrieval.
83      */

84     public final TKVector getActions ()
85         throws TKException
86     {
87         return ActionFactory.getInstance().getActions(this);
88     }
89
90 }
91
Popular Tags