View Javadoc

1   /*
2    *  Copyright (C) 2004  The Concord Consortium, Inc.,
3    *  10 Concord Crossing, Concord, MA 01741
4    *
5    *  Web Site: http://www.concord.org
6    *  Email: info@concord.org
7    *
8    *  This library is free software; you can redistribute it and/or
9    *  modify it under the terms of the GNU Lesser General Public
10   *  License as published by the Free Software Foundation; either
11   *  version 2.1 of the License, or (at your option) any later version.
12   *
13   *  This library is distributed in the hope that it will be useful,
14   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16   *  Lesser General Public License for more details.
17   *
18   *  You should have received a copy of the GNU Lesser General Public
19   *  License along with this library; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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  		// TODO Auto-generated method stub
87  		
88  	}
89  
90  	public void call() {
91  		// TODO Auto-generated method stub
92  		
93  	}
94  
95  	public void reply()
96  	{
97  		// TODO Auto-generated method stub
98  		
99  	}
100 
101 	@Override
102 	public void close() {
103 		// TODO Auto-generated method stub
104 		
105 	}
106 
107 	public Iterator transitions()
108 	{
109 		// TODO Auto-generated method stub
110 		return null;
111 	}
112 }