01: /* RootNode.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Sat Sep 17 12:35:35 2005, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2004 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.web.servlet.dsp.impl;
20:
21: import java.util.Iterator;
22: import java.io.IOException;
23:
24: import org.zkoss.util.logging.Log;
25:
26: import org.zkoss.web.servlet.xel.RequestContexts;
27: import org.zkoss.web.servlet.dsp.*;
28:
29: /**
30: * The root node for the parsed result.
31: *
32: * @author tomyeh
33: */
34: class RootNode extends Node implements Interpretation {
35: // private static final Log log = Log.lookup(RootNode.class);
36:
37: RootNode() {
38: }
39:
40: //-- Node --//
41: void interpret(InterpretContext ic)
42: throws javax.servlet.ServletException, IOException {
43: if (_children == null)
44: return;
45: for (Iterator it = _children.iterator(); it.hasNext();) {
46: ((Node) it.next()).interpret(ic);
47: }
48: }
49:
50: //-- Interpretation --//
51: public void interpret(DspContext dc)
52: throws javax.servlet.ServletException, IOException {
53: RequestContexts.push(dc);
54: try {
55: interpret(new InterpretContext(dc));
56: } finally {
57: RequestContexts.pop();
58: }
59: }
60: }
|