Search in sources :

Example 1 with ParserContext

use of org.springframework.binding.expression.ParserContext in project cas by apereo.

the class AbstractCasWebflowConfigurer method createEvaluateAction.

@Override
public EvaluateAction createEvaluateAction(final String expression) {
    if (this.flowBuilderServices == null) {
        LOGGER.error("Flow builder services is not configured correctly.");
        return null;
    }
    final ParserContext ctx = new FluentParserContext();
    final Expression action = this.flowBuilderServices.getExpressionParser().parseExpression(expression, ctx);
    final EvaluateAction newAction = new EvaluateAction(action, null);
    LOGGER.debug("Created evaluate action for expression [[{}]]", action.getExpressionString());
    return newAction;
}
Also used : FluentParserContext(org.springframework.binding.expression.support.FluentParserContext) Expression(org.springframework.binding.expression.Expression) LiteralExpression(org.springframework.binding.expression.support.LiteralExpression) EvaluateAction(org.springframework.webflow.action.EvaluateAction) FluentParserContext(org.springframework.binding.expression.support.FluentParserContext) ParserContext(org.springframework.binding.expression.ParserContext)

Aggregations

Expression (org.springframework.binding.expression.Expression)1 ParserContext (org.springframework.binding.expression.ParserContext)1 FluentParserContext (org.springframework.binding.expression.support.FluentParserContext)1 LiteralExpression (org.springframework.binding.expression.support.LiteralExpression)1 EvaluateAction (org.springframework.webflow.action.EvaluateAction)1