1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package net.sf.sail.core.activity.model;
25
26 import java.util.Iterator;
27 import java.util.List;
28 import java.util.Vector;
29
30 import javax.script.ScriptException;
31
32 public class NavNodeSupport
33 extends ScriptBeanContext
34 implements INavNode
35 {
36 private static final long serialVersionUID = 3256726190747564080L;
37 protected List listeners = new Vector();
38 protected INavNode parentNode = null;
39 protected Object result;
40
41 public NavNodeSupport()
42 {
43 super();
44 }
45
46 @Override
47 public void initialize()
48 {
49 super.initialize();
50 try
51 {
52 result = evaluate();
53 }
54 catch (ScriptException se)
55 {
56 System.out.println("Activity.initialize(): " + se);
57 }
58 }
59
60 @Override
61 public INavElement getRootElement()
62 {
63 if ((parentNode == null) || (parentNode == this))
64 return this;
65 return parentNode.getRootElement();
66 }
67
68 @Override
69 public INavElement getParentElement()
70 {
71 return parentNode;
72 }
73
74 public void setParentState(INavNode node)
75 {
76 parentNode = node;
77 }
78
79 public void enter()
80 {
81
82 }
83
84 public void exit()
85 {
86
87
88 }
89
90 public void call() {
91
92
93 }
94
95 public void reply()
96 {
97
98
99 }
100
101 @Override
102 public void close() {
103
104
105 }
106
107 public Iterator transitions()
108 {
109
110 return null;
111 }
112 }