private void registerFlowLocationPatterns() { if (flowLocationPatterns != null) { for (String pattern : flowLocationPatterns) { FlowDefinitionResource[] resources; AttributeMap<Object> attributes = getFlowAttributes(Collections.emptySet()); try { resources = flowResourceFactory.createResources(pattern, attributes); } catch (IOException e) { IllegalStateException ise = new IllegalStateException( "An I/O Exception occurred resolving the flow location pattern '" + pattern + "'"); ise.initCause(e); throw ise; } for (FlowDefinitionResource resource : resources) { flowRegistry.registerFlowDefinition(createFlowDefinitionHolder(resource)); } } } }
private FlowDefinitionResource createResource(FlowLocation location) { AttributeMap<Object> flowAttributes = getFlowAttributes(location.getAttributes()); return flowResourceFactory.createResource(location.getPath(), flowAttributes, location.getId()); }
private FlowDefinition buildFlowDefinition(FlowBuilderInfo builderInfo) { try { Class<?> flowBuilderClass = loadClass(builderInfo.getClassName()); FlowBuilder builder = (FlowBuilder) flowBuilderClass.newInstance(); AttributeMap<Object> flowAttributes = getFlowAttributes(builderInfo.getAttributes()); FlowBuilderContext builderContext = new FlowBuilderContextImpl(builderInfo.getId(), flowAttributes, flowRegistry, flowBuilderServices); FlowAssembler assembler = new FlowAssembler(builder, builderContext); return assembler.assembleFlow(); } catch (IllegalArgumentException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } catch (InstantiationException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } catch (IllegalAccessException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } }
private void registerFlowLocationPatterns() { if (flowLocationPatterns != null) { for (String pattern : flowLocationPatterns) { FlowDefinitionResource[] resources; AttributeMap<Object> attributes = getFlowAttributes(Collections.emptySet()); try { resources = flowResourceFactory.createResources(pattern, attributes); } catch (IOException e) { IllegalStateException ise = new IllegalStateException( "An I/O Exception occurred resolving the flow location pattern '" + pattern + "'"); ise.initCause(e); throw ise; } for (FlowDefinitionResource resource : resources) { flowRegistry.registerFlowDefinition(createFlowDefinitionHolder(resource)); } } } }
private void registerFlowLocationPatterns() { if (flowLocationPatterns != null) { for (int i = 0; i < flowLocationPatterns.length; i++) { String pattern = flowLocationPatterns[i]; FlowDefinitionResource[] resources; AttributeMap attributes = getFlowAttributes(Collections.EMPTY_SET); try { resources = flowResourceFactory.createResources(pattern, attributes); } catch (IOException e) { IllegalStateException ise = new IllegalStateException( "An I/O Exception occurred resolving the flow location pattern '" + pattern + "'"); ise.initCause(e); throw ise; } for (int j = 0; j < resources.length; j++) { flowRegistry.registerFlowDefinition(createFlowDefinitionHolder(resources[j])); } } } }
private FlowDefinitionResource createResource(FlowLocation location) { AttributeMap<Object> flowAttributes = getFlowAttributes(location.getAttributes()); return flowResourceFactory.createResource(location.getPath(), flowAttributes, location.getId()); }
private FlowDefinitionResource createResource(FlowLocation location) { AttributeMap flowAttributes = getFlowAttributes(location.getAttributes()); return flowResourceFactory.createResource(location.getPath(), flowAttributes, location.getId()); }
private FlowDefinition buildFlowDefinition(FlowBuilderInfo builderInfo) { try { Class<?> flowBuilderClass = loadClass(builderInfo.getClassName()); FlowBuilder builder = (FlowBuilder) flowBuilderClass.newInstance(); AttributeMap<Object> flowAttributes = getFlowAttributes(builderInfo.getAttributes()); FlowBuilderContext builderContext = new FlowBuilderContextImpl(builderInfo.getId(), flowAttributes, flowRegistry, flowBuilderServices); FlowAssembler assembler = new FlowAssembler(builder, builderContext); return assembler.assembleFlow(); } catch (IllegalArgumentException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } catch (InstantiationException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } catch (IllegalAccessException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } }
private FlowDefinition buildFlowDefinition(FlowBuilderInfo builderInfo) { try { Class flowBuilderClass = loadClass(builderInfo.getClassName()); FlowBuilder builder = (FlowBuilder) flowBuilderClass.newInstance(); AttributeMap flowAttributes = getFlowAttributes(builderInfo.getAttributes()); FlowBuilderContext builderContext = new FlowBuilderContextImpl(builderInfo.getId(), flowAttributes, flowRegistry, flowBuilderServices); FlowAssembler assembler = new FlowAssembler(builder, builderContext); return assembler.assembleFlow(); } catch (IllegalArgumentException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } catch (InstantiationException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } catch (IllegalAccessException e) { throw new FlowDefinitionConstructionException(builderInfo.getId(), e); } }