public Model createCopy() { OutputModel copy = new OutputModel(getName(), getValue()); super.fillCopy(copy); return copy; }
private DefaultMapping parseFlowOutputMapping(OutputModel output) { ExpressionParser parser = getLocalContext().getExpressionParser(); String name = output.getName(); String value = null; if (StringUtils.hasText(output.getValue())) { value = output.getValue(); } else { value = name; } Expression source = parser.parseExpression(value, new FluentParserContext().evaluate(RequestContext.class)); Expression target = parser.parseExpression(name, new FluentParserContext().evaluate(MutableAttributeMap.class)); DefaultMapping mapping = new DefaultMapping(source, target); parseAndSetMappingConversionExecutor(output, mapping); parseAndSetMappingRequired(output, mapping); return mapping; }
private DefaultMapping parseSubflowOutputMapping(OutputModel output) { ExpressionParser parser = getLocalContext().getExpressionParser(); String name = output.getName(); String value = null; if (StringUtils.hasText(output.getValue())) { value = output.getValue(); } else { value = "flowScope." + name; } Expression source = parser.parseExpression(name, new FluentParserContext().evaluate(MutableAttributeMap.class)); Expression target = parser.parseExpression(value, new FluentParserContext().evaluate(RequestContext.class)); DefaultMapping mapping = new DefaultMapping(source, target); parseAndSetMappingConversionExecutor(output, mapping); parseAndSetMappingRequired(output, mapping); return mapping; }
public Model createCopy() { OutputModel copy = new OutputModel(getName(), getValue()); super.fillCopy(copy); return copy; }
private DefaultMapping parseSubflowOutputMapping(OutputModel output) { ExpressionParser parser = getLocalContext().getExpressionParser(); String name = output.getName(); String value = null; if (StringUtils.hasText(output.getValue())) { value = output.getValue(); } else { value = "flowScope." + name; } Expression source = parser.parseExpression(name, new FluentParserContext().evaluate(MutableAttributeMap.class)); Expression target = parser.parseExpression(value, new FluentParserContext().evaluate(RequestContext.class)); DefaultMapping mapping = new DefaultMapping(source, target); parseAndSetMappingConversionExecutor(output, mapping); parseAndSetMappingRequired(output, mapping); return mapping; }
private DefaultMapping parseFlowOutputMapping(OutputModel output) { ExpressionParser parser = getLocalContext().getExpressionParser(); String name = output.getName(); String value = null; if (StringUtils.hasText(output.getValue())) { value = output.getValue(); } else { value = name; } Expression source = parser.parseExpression(value, new FluentParserContext().evaluate(RequestContext.class)); Expression target = parser.parseExpression(name, new FluentParserContext().evaluate(MutableAttributeMap.class)); DefaultMapping mapping = new DefaultMapping(source, target); parseAndSetMappingConversionExecutor(output, mapping); parseAndSetMappingRequired(output, mapping); return mapping; }
private DefaultMapping parseSubflowOutputMapping(OutputModel output) { ExpressionParser parser = getLocalContext().getExpressionParser(); String name = output.getName(); String value = null; if (StringUtils.hasText(output.getValue())) { value = output.getValue(); } else { value = "flowScope." + name; } Expression source = parser.parseExpression(name, new FluentParserContext().evaluate(MutableAttributeMap.class)); Expression target = parser.parseExpression(value, new FluentParserContext().evaluate(RequestContext.class)); DefaultMapping mapping = new DefaultMapping(source, target); parseAndSetMappingConversionExecutor(output, mapping); parseAndSetMappingRequired(output, mapping); return mapping; }
private DefaultMapping parseFlowOutputMapping(OutputModel output) { ExpressionParser parser = getLocalContext().getExpressionParser(); String name = output.getName(); String value = null; if (StringUtils.hasText(output.getValue())) { value = output.getValue(); } else { value = name; } Expression source = parser.parseExpression(value, new FluentParserContext().evaluate(RequestContext.class)); Expression target = parser.parseExpression(name, new FluentParserContext().evaluate(MutableAttributeMap.class)); DefaultMapping mapping = new DefaultMapping(source, target); parseAndSetMappingConversionExecutor(output, mapping); parseAndSetMappingRequired(output, mapping); return mapping; }
public void testMerge() { EndStateModel child = new EndStateModel("child"); EndStateModel parent = new EndStateModel("child"); parent.setCommit("true"); parent.setView("view"); LinkedList<OutputModel> outputs = new LinkedList<>(); outputs.add(new OutputModel("foo", "bar")); parent.setOutputs(outputs); child.merge(parent); assertEquals("true", child.getCommit()); assertEquals("bar", child.getOutputs().get(0).getValue()); } }