1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.scxml.env.jsp;
18
19 import javax.servlet.jsp.el.ELException;
20 import javax.servlet.jsp.el.VariableResolver;
21
22 import org.apache.commons.scxml.Context;
23 import org.apache.commons.scxml.env.SimpleContext;
24
25 /***
26 * EL Context for SCXML interpreter.
27 *
28 */
29 public class ELContext extends SimpleContext implements VariableResolver {
30
31 /*** Serial version UID. */
32 private static final long serialVersionUID = 1L;
33
34 /***
35 * Constructor.
36 *
37 */
38 public ELContext() {
39 super();
40 }
41
42 /***
43 * Constructor.
44 *
45 * @param parent A parent Context, can be null
46 */
47 public ELContext(final Context parent) {
48 super(parent);
49 }
50
51 /***
52 * Resolves the specified variable. Returns null if the variable is
53 * not found.
54 *
55 * @param pName The variable to resolve
56 * @return Object The value of the variable, or null, if it does not
57 * exist
58 * @throws ELException While resolving the variable
59 * @see javax.servlet.jsp.el.VariableResolver#resolveVariable(String)
60 */
61 public Object resolveVariable(final String pName) throws ELException {
62 return get(pName);
63 }
64
65 }
66