/** * Factory method that creates a flow definition from an externalized resource location. * @param location the location of the resource * @return the externalized flow definition pointer */ protected FlowDefinitionResource createFlowDefinitionResource(Resource location) { return new FlowDefinitionResource(location); }
/** * Convenient factory method that creates a {@link FlowDefinitionResource} from a file. Typically called by * subclasses overriding {@link #getFlowDefinitionResource()}. * @param file the file * @return the flow definition resource */ protected FlowDefinitionResource createFlowDefinitionResource(File file) { return new FlowDefinitionResource(new FileSystemResource(file)); } }
/** * Add flow definitions configured using a property map to the flow definition registrar. */ private void addFlowDefinitionsFromProperties() { if (flowDefinitions != null) { Iterator it = flowDefinitions.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); String flowId = (String) entry.getKey(); String location = (String) entry.getValue(); Resource resource = getFlowServiceLocator().getResourceLoader().getResource(location); getXmlFlowRegistrar().addResource( new FlowDefinitionResource(flowId, resource, getFlowAttributes(flowId))); } } }
/** * Add configured flow definition locations to the flow definition registrar. */ private void addFlowDefinitionLocations() { if (locations != null) { for (int i = 0; i < locations.length; i++) { String flowId = FlowDefinitionResource.conventionalFlowId(locations[i]); getXmlFlowRegistrar().addResource( new FlowDefinitionResource(flowId, locations[i], getFlowAttributes(flowId))); } } }