Examples of SpelExpressionParser


Examples of org.springframework.expression.spel.standard.SpelExpressionParser

        assertEquals("foo", output.get("y"));
      }
    };
    EndState state = new EndState(flow, "end");
    DefaultMapper mapper = new DefaultMapper();
    ExpressionParser parser = new WebFlowSpringELExpressionParser(new SpelExpressionParser());
    Expression x = parser.parseExpression("flowScope.x", new FluentParserContext().evaluate(RequestContext.class));
    Expression y = parser.parseExpression("y", new FluentParserContext().evaluate(MutableAttributeMap.class));
    mapper.addMapping(new DefaultMapping(x, y));
    state.setOutputMapper(mapper);
    MockRequestControlContext context = new MockRequestControlContext(flow);
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

          "Do not specify a custom expression-parser when enable-managed-beans is true");
      return this.expressionParser;
    }
    else {
      return (this.enableManagedBeans ?
          new FacesSpringELExpressionParser(new SpelExpressionParser(), this.conversionService) :
          new WebFlowSpringELExpressionParser(new SpelExpressionParser(), this.conversionService));
    }
  }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

          .build();
    }

    @Bean
    public WebFlowSpringELExpressionParser customExpressionParser() {
      return new WebFlowSpringELExpressionParser(new SpelExpressionParser());
    }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

  private ConverterRegistry converterRegistry;
  private WebFlowSpringELExpressionParser expressionParser;

  public void setUp() {
    conversionService = new DefaultConversionService();
    expressionParser = new WebFlowSpringELExpressionParser(new SpelExpressionParser(), conversionService);
    converterRegistry = (ConverterRegistry) conversionService.getDelegateConversionService();
  }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

import org.springframework.webflow.expression.spel.WebFlowSpringELExpressionParser;

public class DefaultBindingModelTests extends AbstractBindingModelTests {

  protected ExpressionParser getExpressionParser() {
    return new WebFlowSpringELExpressionParser(new SpelExpressionParser());
  }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

  public static FlowBuilderServices getServices() {
    FlowBuilderServices services = new FlowBuilderServices() {
      // The SpEL parser must use the currently configured conversion service.
      public void setConversionService(ConversionService conversionService) {
        super.setConversionService(conversionService);
        setExpressionParser(new WebFlowSpringELExpressionParser(new SpelExpressionParser(), conversionService));
      }
    };
    services.setViewFactoryCreator(new MockViewFactoryCreator());
    services.setConversionService(new DefaultConversionService());
    services.setApplicationContext(createTestApplicationContext());
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

  private ExpressionParser getExpressionParser() {
    if (this.expressionParser != null) {
      return this.expressionParser;
    }
    else {
      return new WebFlowSpringELExpressionParser(new SpelExpressionParser(), this.conversionService);
    }
  }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

    messageSource.addMessage("foo", Locale.getDefault(), "bar");
    messageSource.addMessage("bar", Locale.getDefault(), "{0}");

    context = new DefaultMessageContext(messageSource);

    SpringELExpressionParser parser = new SpringELExpressionParser(new SpelExpressionParser());
    DefaultMessageCodesResolver resolver = new DefaultMessageCodesResolver();
    errors = new MessageContextErrors(context, "object", new Object(), parser, resolver, null);
  }
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

   */
  public static Boolean evaluateExpression(Object obj, String expression) {
    if (StringUtil.isEmpty(expression))
      return false;
    try {
      ExpressionParser parser = new SpelExpressionParser();
      Expression exp = parser.parseExpression(expression);
      return exp.getValue(obj, Boolean.class);    
    } catch (Exception e) {
      _log.debug("Failed to evaluate expression ["+expression+"] for object ["+obj.getClass()+"].");
      _log.debug(e.getMessage());
      return false;
View Full Code Here

Examples of org.springframework.expression.spel.standard.SpelExpressionParser

public class ELRequestMatcher implements RequestMatcher {

    private Expression expression;

    public ELRequestMatcher(String el) {
        SpelExpressionParser parser = new SpelExpressionParser();
        expression = parser.parseExpression(el);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.