Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
ELContext |
|
| 1.0;1 |
1 | /* |
|
2 | * |
|
3 | * Copyright 2005 The Apache Software Foundation. |
|
4 | * |
|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 | * you may not use this file except in compliance with the License. |
|
7 | * You may obtain a copy of the License at |
|
8 | * |
|
9 | * 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 | */ |
|
18 | package org.apache.commons.scxml.env.jsp; |
|
19 | ||
20 | import javax.servlet.jsp.el.ELException; |
|
21 | import javax.servlet.jsp.el.VariableResolver; |
|
22 | ||
23 | import org.apache.commons.scxml.Context; |
|
24 | import org.apache.commons.scxml.env.SimpleContext; |
|
25 | ||
26 | /** |
|
27 | * EL Context for SCXML interpreter. |
|
28 | * |
|
29 | */ |
|
30 | public class ELContext extends SimpleContext implements VariableResolver { |
|
31 | ||
32 | /** |
|
33 | * Constructor. |
|
34 | * |
|
35 | */ |
|
36 | public ELContext() { |
|
37 | 9 | super(); |
38 | 9 | } |
39 | ||
40 | /** |
|
41 | * Constructor. |
|
42 | * |
|
43 | * @param parent A parent Context, can be null |
|
44 | */ |
|
45 | public ELContext(final Context parent) { |
|
46 | 45 | super(parent); |
47 | 45 | } |
48 | ||
49 | /** |
|
50 | * Resolves the specified variable. Returns null if the variable is |
|
51 | * not found. |
|
52 | * |
|
53 | * @param pName The variable to resolve |
|
54 | * @return Object The value of the variable, or null, if it does not |
|
55 | * exist |
|
56 | * @throws ELException While resolving the variable |
|
57 | * @see javax.servlet.jsp.el.VariableResolver#resolveVariable(String) |
|
58 | */ |
|
59 | public Object resolveVariable(final String pName) throws ELException { |
|
60 | 47 | return get(pName); |
61 | } |
|
62 | ||
63 | } |
|
64 |