Revision 1415,
939 bytes
checked in by wojtekp, 11 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Line | |
---|
1 | package schedframe.events.scheduling; |
---|
2 | |
---|
3 | import schedframe.events.Event; |
---|
4 | import schedframe.events.EventReason; |
---|
5 | import schedframe.events.EventType; |
---|
6 | |
---|
7 | public class SchedulingEvent implements Event{ |
---|
8 | |
---|
9 | protected EventType type; |
---|
10 | protected EventReason reason; |
---|
11 | |
---|
12 | protected String source; |
---|
13 | |
---|
14 | public SchedulingEvent(EventType eventType){ |
---|
15 | this(eventType, EventReason.UNKNOWN); |
---|
16 | } |
---|
17 | |
---|
18 | public SchedulingEvent(EventType eventType, EventReason eventReason){ |
---|
19 | this.type = eventType; |
---|
20 | this.reason = eventReason; |
---|
21 | } |
---|
22 | |
---|
23 | public SchedulingEventType getType(){ |
---|
24 | SchedulingEventType schedEventType; |
---|
25 | try{ |
---|
26 | schedEventType = (SchedulingEventType)type; |
---|
27 | } catch(Exception e){ |
---|
28 | schedEventType = null; |
---|
29 | } |
---|
30 | return schedEventType; |
---|
31 | } |
---|
32 | |
---|
33 | public EventReason getReason(){ |
---|
34 | return reason; |
---|
35 | } |
---|
36 | |
---|
37 | public void setSource(String value){ |
---|
38 | this.source = value; |
---|
39 | } |
---|
40 | |
---|
41 | public String getSource(){ |
---|
42 | return source; |
---|
43 | } |
---|
44 | |
---|
45 | public Object getData() { |
---|
46 | return null; |
---|
47 | } |
---|
48 | |
---|
49 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.