01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
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
30: VariableResolver {
31:
32: /** Serial version UID. */
33: private static final long serialVersionUID = 1L;
34:
35: /**
36: * Constructor.
37: *
38: */
39: public ELContext() {
40: super ();
41: }
42:
43: /**
44: * Constructor.
45: *
46: * @param parent A parent Context, can be null
47: */
48: public ELContext(final Context parent) {
49: super (parent);
50: }
51:
52: /**
53: * Resolves the specified variable. Returns null if the variable is
54: * not found.
55: *
56: * @param pName The variable to resolve
57: * @return Object The value of the variable, or null, if it does not
58: * exist
59: * @throws ELException While resolving the variable
60: * @see javax.servlet.jsp.el.VariableResolver#resolveVariable(String)
61: */
62: public Object resolveVariable(final String pName)
63: throws ELException {
64: return get(pName);
65: }
66:
67: }
|