} catch (ELException e) { throw new SCXMLExpressionException("eval('" + expr + "'):" + e.getMessage(), e);
/** * @see Evaluator#evalCond(Context, String) */ public Boolean evalCond(final Context ctx, final String expr) throws SCXMLExpressionException { if (expr == null) { return null; } VariableResolver vr = null; if (ctx instanceof VariableResolver) { vr = (VariableResolver) ctx; } else { vr = new ContextWrapper(ctx); } try { String evalExpr = inFct.matcher(expr). replaceAll("In(_ALL_STATES, "); evalExpr = dataFct.matcher(evalExpr). replaceAll("Data(_ALL_NAMESPACES, "); Boolean rslt = (Boolean) getEvaluator().evaluate(evalExpr, Boolean.class, vr, builtinFnMapper); if (log.isDebugEnabled()) { log.debug(expr + " = " + String.valueOf(rslt)); } return rslt; } catch (ELException e) { throw new SCXMLExpressionException("eval('" + expr + "'):" + e.getMessage(), e); } }
/** * Get the value of the given variable in this Context. * * @param name The name of the variable * @return The value (or null) * @see org.apache.commons.scxml.Context#get(java.lang.String) */ public Object get(final String name) { Object value = super.get(name); if (value == null) { try { value = variableResolver.resolveVariable(name); } catch (ELException ele) { getLog().error(ele.getMessage(), ele); } } return value; }
} catch (ELException e) { throw new SCXMLExpressionException("eval('" + expr + "'):" + e.getMessage(), e);
@Override public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { Object obj = this.variableResolver.resolveVariable(property .toString()); return (obj != null) ? obj.getClass() : null; } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getType(context, base, property); } return null; }
@Override public Class<?> getType(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base == null) { context.setPropertyResolved(base, property); if (property != null) { try { Object obj = this.variableResolver.resolveVariable(property .toString()); return (obj != null) ? obj.getClass() : null; } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getType(context, base, property); } return null; }
@Override public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { Object obj = this.variableResolver.resolveVariable(property .toString()); return (obj != null) ? obj.getClass() : null; } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getType(context, base, property); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base == null) { context.setPropertyResolved(base, property); if (property != null) { try { return this.variableResolver.resolveVariable(property .toString()); } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getValue(context, base, property); } return null; }
@Override public Class<?> getType(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base == null) { context.setPropertyResolved(base, property); if (property != null) { try { Object obj = this.variableResolver.resolveVariable(property .toString()); return (obj != null) ? obj.getClass() : null; } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(MESSAGES.errorResolvingVariable (property.toString(), e.getMessage()), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getType(context, base, property); } return null; }
@Override public Class<?> getType(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(base, property); if (property != null) { try { Object obj = this.variableResolver.resolveVariable(property .toString()); return (obj != null) ? obj.getClass() : null; } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getType(context, base, property); } return null; }
/** * Does the given variable exist in this Context. * * @param name The name of the variable * @return boolean true if the variable exists * @see org.apache.commons.scxml.Context#has(java.lang.String) */ public boolean has(final String name) { boolean exists = super.has(name); Object value = null; if (!exists) { try { value = variableResolver.resolveVariable(name); } catch (ELException ele) { getLog().error(ele.getMessage(), ele); } if (value != null) { exists = true; } } return exists; }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base == null) { context.setPropertyResolved(base, property); if (property != null) { try { return this.variableResolver.resolveVariable(property .toString()); } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(MESSAGES.errorResolvingVariable (property.toString(), e.getMessage()), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getValue(context, base, property); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { return this.variableResolver.resolveVariable(property .toString()); } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getValue(context, base, property); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { return this.variableResolver.resolveVariable(property .toString()); } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getValue(context, base, property); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(base, property); if (property != null) { try { return this.variableResolver.resolveVariable(property .toString()); } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return elResolver.getValue(context, base, property); } return null; }
public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { return this.variableResolver.resolveVariable(property .toString()); } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return getDefaultResolver().getValue(context, base, property); } return null; }
public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { Object obj = this.variableResolver.resolveVariable(property .toString()); return (obj != null) ? obj.getClass() : null; } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(e.getMessage(), e.getCause()); } } } if (!context.isPropertyResolved()) { return getDefaultResolver().getType(context, base, property); } return null; }
public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw MESSAGES.elResolverNullContext(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { Object obj = this.variableResolver.resolveVariable(property .toString()); return (obj != null) ? obj.getClass() : null; } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(MESSAGES.errorResolvingVariable (property.toString(), e.getMessage()), e.getCause()); } } } if (!context.isPropertyResolved()) { return getDefaultResolver().getType(context, base, property); } return null; }
public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw MESSAGES.elResolverNullContext(); } if (base == null) { context.setPropertyResolved(true); if (property != null) { try { return this.variableResolver.resolveVariable(property .toString()); } catch (javax.servlet.jsp.el.ELException e) { throw new ELException(MESSAGES.errorResolvingVariable (property.toString(), e.getMessage()), e.getCause()); } } } if (!context.isPropertyResolved()) { return getDefaultResolver().getValue(context, base, property); } return null; }
context.setErrorInfo(EL_ERROR, ex.getMessage()); LOG.warn("ELException in ActionStartXCommand ", ex.getMessage(), ex); handleError(context, wfJob, wfAction);