01: package org.jicengine.element;
02:
03: import org.jicengine.operation.Context;
04: import org.jicengine.operation.OperationException;
05:
06: /**
07: * <p>
08: * Executable/runtime instantiation of a JIC-element. JIC-processing is based
09: * on Elements.
10: * </p>
11: *
12: * <p>
13: * Design-note: getLocation() was removed: it is needed mostly internally by
14: * the element when it throws exeptions. this is a public interface.
15: * </p>
16: *
17: * <p>
18: * Copyright (C) 2004 Timo Laitinen
19: * </p>
20: * @author Timo Laitinen
21: * @created 2004-09-20
22: * @since JICE-0.10
23: *
24: */
25:
26: public interface Element {
27:
28: /**
29: * Name of a variable that refers to the CDATA section of the element.
30: */
31: public static final String VARIABLE_NAME_CDATA = "cdata";
32:
33: /**
34: * Name of a variable that refers to the instance of the parent element.
35: */
36: public static final String VARIABLE_NAME_PARENT_INSTANCE = "parent";
37:
38: /**
39: * Name of a variable that refers to the instance of this element.
40: */
41: public static final String VARIABLE_NAME_ELEMENT_INSTANCE = "this";
42:
43: /**
44: * The name of this element.
45: *
46: * @return String
47: */
48: public String getName();
49:
50: /**
51: * The location of this element in the JIC file.
52: *
53: * @return Location
54: */
55: public Location getLocation();
56:
57: /**
58: * For testing whether this element should be executed or not. The execution
59: * methods in subinterfaces VariableElement and ActionElement should be called
60: * only if this returns true.
61: *
62: * @param outerContext Context
63: * @return boolean
64: * @throws OperationException
65: */
66: public boolean isExecuted(Context outerContext,
67: Object parentInstance) throws ElementException;
68:
69: }
|