01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: ElementScripted.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine;
09:
10: import com.uwyn.rife.engine.exceptions.EngineException;
11:
12: /**
13: * The <code>ElementScripted</code> class provides a bridge between
14: * scripting engines and the element backend. You should never have to deal
15: * with this class directly.
16: *
17: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
18: * @version $Revision: 3634 $
19: * @since 1.0
20: */
21: public class ElementScripted extends Element {
22: private ScriptedEngine mEngine = null;
23:
24: /**
25: * Creates a new <code>ElementScripted</code> instance for a particular
26: * scripting engine.
27: *
28: * @param engine the scripting engine that this element has to be linked to
29: *
30: * @exception EngineException when an unexpected error occurred while linking
31: * the scripted element to the engine
32: */
33: public ElementScripted(ScriptedEngine engine)
34: throws EngineException {
35: super ();
36:
37: mEngine = engine;
38: engine.setElement(this );
39: }
40:
41: public void processElement() {
42: mEngine.processElement();
43: }
44:
45: public boolean childTriggered(String name, String[] values) {
46: return mEngine.childTriggered(name, values);
47: }
48: }
|