Package org.springframework.binding.mapping.impl

Examples of org.springframework.binding.mapping.impl.DefaultMapper.addMapping()


    DefaultMapper attributeMapper = new DefaultMapper();
    ExpressionParser parser = new WebFlowSpringELExpressionParser(new SpelExpressionParser());
    Expression x = parser.parseExpression("flowScope.attr",
        new FluentParserContext().evaluate(RequestContext.class));
    Expression y = parser.parseExpression("attr", new FluentParserContext().evaluate(MutableAttributeMap.class));
    attributeMapper.addMapping(new DefaultMapping(x, y));
    flow.setOutputMapper(attributeMapper);
    MockRequestControlContext context = new MockRequestControlContext(flow);
    context.getFlowScope().put("attr", "foo");
    LocalAttributeMap<Object> sessionOutput = new LocalAttributeMap<Object>();
    flow.end(context, "finish", sessionOutput);
View Full Code Here


    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);
    context.getFlowScope().put("x", "foo");
    state.enter(context);
  }
View Full Code Here

  private Mapper parseFlowInputMapper(List<InputModel> inputs) {
    if (inputs != null && !inputs.isEmpty()) {
      DefaultMapper inputMapper = new DefaultMapper();
      for (InputModel inputModel : inputs) {
        inputMapper.addMapping(parseFlowInputMapping(inputModel));
      }
      return inputMapper;
    } else {
      return null;
    }
View Full Code Here

  private Mapper parseSubflowInputMapper(List<InputModel> inputs) {
    if (inputs != null && !inputs.isEmpty()) {
      DefaultMapper inputMapper = new DefaultMapper();
      for (InputModel inputModel : inputs) {
        inputMapper.addMapping(parseSubflowInputMapping(inputModel));
      }
      return inputMapper;
    } else {
      return null;
    }
View Full Code Here

  private Mapper parseFlowOutputMapper(List<OutputModel> outputs) {
    if (outputs != null && !outputs.isEmpty()) {
      DefaultMapper outputMapper = new DefaultMapper();
      for (OutputModel outputModel : outputs) {
        outputMapper.addMapping(parseFlowOutputMapping(outputModel));
      }
      return outputMapper;
    } else {
      return null;
    }
View Full Code Here

  private Mapper parseSubflowOutputMapper(List<OutputModel> outputs) {
    if (outputs != null && !outputs.isEmpty()) {
      DefaultMapper outputMapper = new DefaultMapper();
      for (OutputModel outputModel : outputs) {
        outputMapper.addMapping(parseSubflowOutputMapping(outputModel));
      }
      return outputMapper;
    } else {
      return null;
    }
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.