private void registerFlowBuilders() { if (flowBuilders != null) { for (FlowBuilderInfo builderInfo : flowBuilders) { flowRegistry.registerFlowDefinition(buildFlowDefinition(builderInfo)); } } }
private void registerFlowLocations() { if (flowLocations != null) { for (FlowLocation location : flowLocations) { flowRegistry.registerFlowDefinition(createFlowDefinitionHolder(createResource(location))); } } }
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 registerFlowBuilders(DefaultFlowRegistry flowRegistry) { for (FlowBuilderInfo info : this.flowBuilderInfos) { AttributeMap<Object> attributes = info.getAttributes(); updateFlowAttributes(attributes); FlowBuilderContext builderContext = new FlowBuilderContextImpl( info.getId(), attributes, flowRegistry, this.flowBuilderServices); FlowAssembler assembler = new FlowAssembler(info.getBuilder(), builderContext); flowRegistry.registerFlowDefinition(assembler.assembleFlow()); } }
private void registerFlow(FlowDefinitionResource resource, DefaultFlowRegistry flowRegistry) { FlowModelBuilder flowModelBuilder; if (resource.getPath().getFilename().endsWith(".xml")) { flowModelBuilder = new XmlFlowModelBuilder(resource.getPath(), flowRegistry.getFlowModelRegistry()); } else { throw new IllegalArgumentException(resource + " is not a supported resource type; supported types are [.xml]"); } FlowModelHolder flowModelHolder = new DefaultFlowModelHolder(flowModelBuilder); FlowBuilder flowBuilder = new FlowModelFlowBuilder(flowModelHolder); FlowBuilderContext builderContext = new FlowBuilderContextImpl( resource.getId(), resource.getAttributes(), flowRegistry, this.flowBuilderServices); FlowAssembler assembler = new FlowAssembler(flowBuilder, builderContext); DefaultFlowHolder flowHolder = new DefaultFlowHolder(assembler); flowRegistry.getFlowModelRegistry().registerFlowModel(resource.getId(), flowModelHolder); flowRegistry.registerFlowDefinition(flowHolder); }
private void registerFlowBuilders() { if (flowBuilders != null) { for (FlowBuilderInfo builderInfo : flowBuilders) { flowRegistry.registerFlowDefinition(buildFlowDefinition(builderInfo)); } } }
private void registerFlowBuilders() { if (flowBuilders != null) { for (int i = 0; i < flowBuilders.length; i++) { FlowBuilderInfo builderInfo = flowBuilders[i]; flowRegistry.registerFlowDefinition(buildFlowDefinition(builderInfo)); } } }
private void registerFlowLocations() { if (flowLocations != null) { for (FlowLocation location : flowLocations) { flowRegistry.registerFlowDefinition(createFlowDefinitionHolder(createResource(location))); } } }
private void registerFlowLocations() { if (flowLocations != null) { for (int i = 0; i < flowLocations.length; i++) { FlowLocation location = flowLocations[i]; flowRegistry.registerFlowDefinition(createFlowDefinitionHolder(createResource(location))); } } }
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 void registerFlowBuilders(DefaultFlowRegistry flowRegistry) { for (FlowBuilderInfo info : this.flowBuilderInfos) { AttributeMap<Object> attributes = info.getAttributes(); updateFlowAttributes(attributes); FlowBuilderContext builderContext = new FlowBuilderContextImpl( info.getId(), attributes, flowRegistry, this.flowBuilderServices); FlowAssembler assembler = new FlowAssembler(info.getBuilder(), builderContext); flowRegistry.registerFlowDefinition(assembler.assembleFlow()); } }
private void registerFlow(FlowDefinitionResource resource, DefaultFlowRegistry flowRegistry) { FlowModelBuilder flowModelBuilder; if (resource.getPath().getFilename().endsWith(".xml")) { flowModelBuilder = new XmlFlowModelBuilder(resource.getPath(), flowRegistry.getFlowModelRegistry()); } else { throw new IllegalArgumentException(resource + " is not a supported resource type; supported types are [.xml]"); } FlowModelHolder flowModelHolder = new DefaultFlowModelHolder(flowModelBuilder); FlowBuilder flowBuilder = new FlowModelFlowBuilder(flowModelHolder); FlowBuilderContext builderContext = new FlowBuilderContextImpl( resource.getId(), resource.getAttributes(), flowRegistry, this.flowBuilderServices); FlowAssembler assembler = new FlowAssembler(flowBuilder, builderContext); DefaultFlowHolder flowHolder = new DefaultFlowHolder(assembler); flowRegistry.getFlowModelRegistry().registerFlowModel(resource.getId(), flowModelHolder); flowRegistry.registerFlowDefinition(flowHolder); }