001/* 002 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms 005 * of the Common Development and Distribution License 006 * (the "License"). You may not use this file except 007 * in compliance with the License. 008 * 009 * You can obtain a copy of the license at 010 * glassfish/bootstrap/legal/CDDLv1.0.txt or 011 * https://glassfish.dev.java.net/public/CDDLv1.0.html. 012 * See the License for the specific language governing 013 * permissions and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL 016 * HEADER in each file and include the License file at 017 * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 018 * add the following below this CDDL HEADER, with the 019 * fields enclosed by brackets "[]" replaced with your 020 * own identifying information: Portions Copyright [yyyy] 021 * [name of copyright owner] 022 */ 023 024package org.nuxeo.ecm.platform.ui.web.binding; 025 026import javax.el.ELContext; 027import javax.el.ELResolver; 028import javax.el.FunctionMapper; 029import javax.el.VariableMapper; 030 031public final class EvaluationContext extends ELContext { 032 033 private final ELContext elContext; 034 035 private final FunctionMapper fnMapper; 036 037 private final VariableMapper varMapper; 038 039 public EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper) { 040 this.elContext = elContext; 041 this.fnMapper = fnMapper; 042 this.varMapper = varMapper; 043 } 044 045 public ELContext getELContext() { 046 return elContext; 047 } 048 049 @Override 050 public FunctionMapper getFunctionMapper() { 051 return fnMapper; 052 } 053 054 @Override 055 public VariableMapper getVariableMapper() { 056 return varMapper; 057 } 058 059 @Override 060 public Object getContext(Class key) { 061 return elContext.getContext(key); 062 } 063 064 @Override 065 public ELResolver getELResolver() { 066 return elContext.getELResolver(); 067 } 068 069 @Override 070 public boolean isPropertyResolved() { 071 return elContext.isPropertyResolved(); 072 } 073 074 @Override 075 public void putContext(Class key, Object contextObject) { 076 elContext.putContext(key, contextObject); 077 } 078 079 @Override 080 public void setPropertyResolved(boolean resolved) { 081 elContext.setPropertyResolved(resolved); 082 } 083 084}