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: ScriptedEngine.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: abstract class ScriptedEngine {
13: protected ElementScripted mElement = null;
14: protected String mLanguage = null;
15: protected String mCode = null;
16:
17: ScriptedEngine(String language, String code) throws EngineException {
18: mLanguage = language;
19: mCode = code;
20: }
21:
22: void setElement(ElementScripted element) {
23: mElement = element;
24: }
25:
26: ElementScripted getElement() {
27: return mElement;
28: }
29:
30: String getLanguage() {
31: return mLanguage;
32: }
33:
34: String getCode() {
35: return mCode;
36: }
37:
38: abstract void processElement();
39:
40: abstract boolean childTriggered(String name, String[] values);
41: }
|