private void parseAndSetMappingConversionExecutor(AbstractMappingModel mappingModel, DefaultMapping mapping) { if (StringUtils.hasText(mappingModel.getType())) { Class<?> type = toClass(mappingModel.getType()); ConversionExecutor typeConverter = new RuntimeBindingConversionExecutor(type, getLocalContext() .getConversionService()); mapping.setTypeConverter(typeConverter); } }
public Object execute(Object source) throws ConversionExecutionException { return execute(source, null); }
private void parseAndSetMappingConversionExecutor(AbstractMappingModel mappingModel, DefaultMapping mapping) { if (StringUtils.hasText(mappingModel.getType())) { Class<?> type = toClass(mappingModel.getType()); ConversionExecutor typeConverter = new RuntimeBindingConversionExecutor(type, getLocalContext() .getConversionService()); mapping.setTypeConverter(typeConverter); } }
public Object execute(Object source) throws ConversionExecutionException { return execute(source, null); }
private void parseAndSetMappingConversionExecutor(AbstractMappingModel mappingModel, DefaultMapping mapping) { if (StringUtils.hasText(mappingModel.getType())) { Class type = toClass(mappingModel.getType()); ConversionExecutor typeConverter = new RuntimeBindingConversionExecutor(type, getLocalContext() .getConversionService()); mapping.setTypeConverter(typeConverter); } }
public Object execute(Object source) throws ConversionExecutionException { return execute(source, null); }
/** * Create mapping to subflow state. * * @param name the name * @param value the value * @param required the required * @param type the type * @return the default mapping */ public DefaultMapping createMappingToSubflowState(final String name, final String value, final boolean required, final Class type) { val parser = this.flowBuilderServices.getExpressionParser(); val source = parser.parseExpression(value, new FluentParserContext()); val target = parser.parseExpression(name, new FluentParserContext()); val mapping = new DefaultMapping(source, target); mapping.setRequired(required); val typeConverter = new RuntimeBindingConversionExecutor(type, this.flowBuilderServices.getConversionService()); mapping.setTypeConverter(typeConverter); return mapping; }
/** * Create mapping to subflow state. * * @param name the name * @param value the value * @param required the required * @param type the type * @return the default mapping */ protected DefaultMapping createMappingToSubflowState(final String name, final String value, final boolean required, final Class type) { final ExpressionParser parser = this.flowBuilderServices.getExpressionParser(); final Expression source = parser.parseExpression(value, new FluentParserContext()); final Expression target = parser.parseExpression(name, new FluentParserContext()); final DefaultMapping mapping = new DefaultMapping(source, target); mapping.setRequired(required); final ConversionExecutor typeConverter = new RuntimeBindingConversionExecutor(type, this.flowBuilderServices.getConversionService()); mapping.setTypeConverter(typeConverter); return mapping; }
/** * Create mapping to subflow state. * * @param name the name * @param value the value * @param required the required * @param type the type * @return the default mapping */ protected DefaultMapping createMappingToSubflowState(final String name, final String value, final boolean required, final Class type) { final ExpressionParser parser = this.flowBuilderServices.getExpressionParser(); final Expression source = parser.parseExpression(value, new FluentParserContext()); final Expression target = parser.parseExpression(name, new FluentParserContext()); final DefaultMapping mapping = new DefaultMapping(source, target); mapping.setRequired(required); final ConversionExecutor typeConverter = new RuntimeBindingConversionExecutor(type, this.flowBuilderServices.getConversionService()); mapping.setTypeConverter(typeConverter); return mapping; }