JellyJexlContext(JellyContext context) { this.vars = new JellyMap( context ); }
public boolean containsKey(Object key) { return ( get( key ) != null ); }
protected ExpressionFactory createExpressionFactory() { return new JexlExpressionFactory(); }
public Expression createExpression(String text) throws JellyException { /* org.apache.commons.jexl.Expression expr = org.apache.commons.jexl.ExpressionFactory.createExpression(text); if ( isSupportAntVariables() ) { expr.addPostResolver(new FlatResolver()); } return new JexlExpression( expr ); */ Expression jexlExpression = null; try { // this method really does throw Exception jexlExpression = new JexlExpression( org.apache.commons.jexl.ExpressionFactory.createExpression(text) ); } catch (Exception e) { throw new JellyException("Unable to create expression: " + text, e); } if ( isSupportAntVariables() && isValidAntVariableName(text) ) { return new ExpressionSupportLocal(jexlExpression,text); } return jexlExpression; }
public Object evaluate(JellyContext context) { try { JexlContext jexlContext = new JellyJexlContext( context ); if (log.isDebugEnabled()) { log.debug("Evaluating EL: " + expression.getExpression()); } Object value = expression.evaluate(jexlContext); if (log.isDebugEnabled()) { log.debug("value of expression: " + value); } return value; } catch (Exception e) { log.warn("Caught exception evaluating: " + expression + ". Reason: " + e, e); return null; } } }
public Expression createExpression(String text) throws JellyException { /* org.apache.commons.jexl.Expression expr = org.apache.commons.jexl.ExpressionFactory.createExpression(text); if ( isSupportAntVariables() ) { expr.addPostResolver(new FlatResolver()); } return new JexlExpression( expr ); */ Expression jexlExpression = null; try { // this method really does throw Exception jexlExpression = new JexlExpression( org.apache.commons.jexl.ExpressionFactory.createExpression(text) ); } catch (Exception e) { throw new JellyException("Unable to create expression: " + text, e); } if ( isSupportAntVariables() && isValidAntVariableName(text) ) { return new ExpressionSupportLocal(jexlExpression,text); } return jexlExpression; }
protected ExpressionFactory createExpressionFactory() { return new JexlExpressionFactory(); }
JellyJexlContext(JellyContext context) { this.vars = new JellyMap( context ); }
public boolean containsKey(Object key) { return ( get( key ) != null ); }
public Object evaluate(JellyContext context) { try { JexlContext jexlContext = new JellyJexlContext( context ); if (log.isDebugEnabled()) { log.debug("Evaluating EL: " + expression.getExpression()); } Object value = expression.evaluate(jexlContext); if (log.isDebugEnabled()) { log.debug("value of expression: " + value); } return value; } catch (Exception e) { log.warn("Caught exception evaluating: " + expression + ". Reason: " + e, e); return null; } } }
public Expression createExpression(String text) throws JellyException { /* org.apache.commons.jexl.Expression expr = org.apache.commons.jexl.ExpressionFactory.createExpression(text); if ( isSupportAntVariables() ) { expr.addPostResolver(new FlatResolver()); } return new JexlExpression( expr ); */ Expression jexlExpression = null; try { // this method really does throw Exception jexlExpression = new JexlExpression( org.apache.commons.jexl.ExpressionFactory.createExpression(text) ); } catch (Exception e) { throw new JellyException("Unable to create expression: " + text, e); } if ( isSupportAntVariables() && isValidAntVariableName(text) ) { return new ExpressionSupportLocal(jexlExpression,text); } return jexlExpression; }
protected ExpressionFactory createExpressionFactory() { return new JexlExpressionFactory(); }
JellyJexlContext(JellyContext context) { this.vars = new JellyMap( context ); }
public boolean containsKey(Object key) { return ( get( key ) != null ); }
public Object evaluate(JellyContext context) { try { JexlContext jexlContext = new JellyJexlContext( context ); if (log.isDebugEnabled()) { log.debug("Evaluating EL: " + expression.getExpression()); } Object value = expression.evaluate(jexlContext); if (log.isDebugEnabled()) { log.debug("value of expression: " + value); } return value; } catch (Exception e) { log.warn("Caught exception evaluating: " + expression + ". Reason: " + e, e); return null; } } }
public Expression createExpression(String text) throws JellyException { /* org.apache.commons.jexl.Expression expr = org.apache.commons.jexl.ExpressionFactory.createExpression(text); if ( isSupportAntVariables() ) { expr.addPostResolver(new FlatResolver()); } return new JexlExpression( expr ); */ Expression jexlExpression = null; try { // this method really does throw Exception jexlExpression = new JexlExpression( org.apache.commons.jexl.ExpressionFactory.createExpression(text) ); } catch (Exception e) { throw new JellyException("Unable to create expression: " + text, e); } if ( isSupportAntVariables() && isValidAntVariableName(text) ) { return new ExpressionSupportLocal(jexlExpression,text); } return jexlExpression; }
protected ExpressionFactory createExpressionFactory() { return new JexlExpressionFactory(); }
JellyJexlContext(JellyContext context) { this.vars = new JellyMap( context ); }
public boolean containsKey(Object key) { return ( get( key ) != null ); }
public XMLTagLibrary() { registerTag("out", ExprTag.class); registerTag("if", IfTag.class); registerTag("forEach", ForEachTag.class); registerTag("parse", ParseTag.class); registerTag("set", SetTag.class); registerTag("transform", TransformTag.class); registerTag("param", ParamTag.class); // extensions to JSTL registerTag("expr", ExprTag.class); registerTag("element", ElementTag.class); registerTag("attribute", AttributeTag.class); registerTag("replaceNamespace", ReplaceNamespaceTag.class); registerTag("copy", CopyTag.class); registerTag("copyOf", CopyOfTag.class); registerTag("comment", CommentTag.class); registerTag("doctype", DoctypeTag.class); registerTag("sort", SortTag.class); this.jexlFactory = new JexlExpressionFactory(); }