| Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
| ELContext |
|
| 1.0;1 |
| 1 | /* |
|
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
| 3 | * contributor license agreements. See the NOTICE file distributed with |
|
| 4 | * this work for additional information regarding copyright ownership. |
|
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
| 6 | * (the "License"); you may not use this file except in compliance with |
|
| 7 | * the License. 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 | 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 | 12 | super(); |
| 40 | 12 | } |
| 41 | ||
| 42 | /** |
|
| 43 | * Constructor. |
|
| 44 | * |
|
| 45 | * @param parent A parent Context, can be null |
|
| 46 | */ |
|
| 47 | public ELContext(final Context parent) { |
|
| 48 | 57 | super(parent); |
| 49 | 57 | } |
| 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 | 107 | return get(pName); |
| 63 | } |
|
| 64 | ||
| 65 | } |
|
| 66 |