protected void initExpressionManager() { if (expressionManager == null) { expressionManager = new ExpressionManager(beans); } // add function mapper for command context (eg currentUser(), currentUserGroups()) expressionManager.addFunctionMapper(new CommandContextFunctionMapper()); // add function mapper for date time (eg now(), dateTime()) expressionManager.addFunctionMapper(new DateTimeFunctionMapper()); }
protected ProcessEngineElContext createElContext(VariableScope variableScope) { ELResolver elResolver = getCachedElResolver(); ProcessEngineElContext elContext = new ProcessEngineElContext(functionMappers, elResolver); elContext.putContext(ExpressionFactory.class, expressionFactory); elContext.putContext(VariableScope.class, variableScope); return elContext; }
/** * Checks whether a {@link String} seams to be a composite expression or not. In contrast to an eval expression * is the composite expression also allowed to consist of a combination of literal and eval expressions, e.g., * "Welcome ${customer.name} to our site". * * Note: If you just want to allow eval expression, then the expression must always start with "#{" or "${". * Use {@link #isExpression(String)} to conduct these kind of checks. * */ public static boolean isCompositeExpression(String text, ExpressionManager expressionManager) { return !expressionManager.createExpression(text).isLiteralText(); }
@Override public int compareTo(ElValueProvider o) { return expression.getExpressionText().compareTo(o.getExpression().getExpressionText()); }
public Expression createExpression(String expression) { ValueExpression valueExpression = createValueExpression(expression); return new JuelExpression(valueExpression, this, expression); }
/** * Returns the name of the event without evaluating the possible expression that it might contain. */ public String getUnresolvedEventName() { return eventName.getExpressionText(); }
protected ELResolver getCachedElResolver() { if (elResolver == null) { synchronized(this) { if (elResolver == null) { elResolver = createElResolver(); } } } return elResolver; }
public JuelScriptEngine(ScriptEngineFactory scriptEngineFactory) { this.scriptEngineFactory = scriptEngineFactory; // Resolve the ExpressionFactory expressionFactory = ExpressionFactoryResolver.resolveExpressionFactory(); }
@Override public boolean evaluate(DelegateExecution execution) { return evaluate(execution, execution); }
public void setValue(Object value, VariableScope variableScope) { setValue(value, variableScope, null); }
protected void initExpressionManager() { if (expressionManager == null) { expressionManager = new ExpressionManager(beans); } // add function mapper for command context (eg currentUser(), currentUserGroups()) expressionManager.addFunctionMapper(new CommandContextFunctionMapper()); // add function mapper for date time (eg now(), dateTime()) expressionManager.addFunctionMapper(new DateTimeFunctionMapper()); }
public ELContext createElContext(VariableContext variableContext) { ELResolver elResolver = getCachedElResolver(); ProcessEngineElContext elContext = new ProcessEngineElContext(functionMappers, elResolver); elContext.putContext(ExpressionFactory.class, expressionFactory); elContext.putContext(VariableContext.class, variableContext); return elContext; }
/** * Checks whether a {@link String} seams to be a composite expression or not. In contrast to an eval expression * is the composite expression also allowed to consist of a combination of literal and eval expressions, e.g., * "Welcome ${customer.name} to our site". * * Note: If you just want to allow eval expression, then the expression must always start with "#{" or "${". * Use {@link #isExpression(String)} to conduct these kind of checks. * */ public static boolean isCompositeExpression(String text, ExpressionManager expressionManager) { return !expressionManager.createExpression(text).isLiteralText(); }
public Expression createExpression(String expression) { ValueExpression valueExpression = createValueExpression(expression); return new JuelExpression(valueExpression, this, expression); }
/** * Returns the name of the event without evaluating the possible expression that it might contain. */ public String getUnresolvedEventName() { return eventName.getExpressionText(); }
protected ELResolver getCachedElResolver() { if (elResolver == null) { synchronized(this) { if (elResolver == null) { elResolver = createElResolver(); } } } return elResolver; }
public JuelScriptEngine(ScriptEngineFactory scriptEngineFactory) { this.scriptEngineFactory = scriptEngineFactory; // Resolve the ExpressionFactory expressionFactory = ExpressionFactoryResolver.resolveExpressionFactory(); }
@Override public boolean evaluate(DelegateExecution execution) { return evaluate(execution, execution); }
protected ProcessEngineElContext createElContext(VariableScope variableScope) { ELResolver elResolver = getCachedElResolver(); ProcessEngineElContext elContext = new ProcessEngineElContext(functionMappers, elResolver); elContext.putContext(ExpressionFactory.class, expressionFactory); elContext.putContext(VariableScope.class, variableScope); return elContext; }
public ELContext createElContext(VariableContext variableContext) { ELResolver elResolver = getCachedElResolver(); ProcessEngineElContext elContext = new ProcessEngineElContext(functionMappers, elResolver); elContext.putContext(ExpressionFactory.class, expressionFactory); elContext.putContext(VariableContext.class, variableContext); return elContext; }