Flow builder that builds flows as defined in an XML document. The XML document should adhere to the following format:
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
<!-- Define your states here -->
</flow>
Consult the web flow XML schema
for more information on the XML-based flow definition format.
This builder will setup a flow-local bean factory for the flow being constructed. That flow-local bean factory will
be populated with XML bean definitions contained in files referenced using the "import" element. The flow-local bean
factory will use the bean factory defing this flow builder as a parent. As such, the flow can access artifacts in
either its flow-local bean factory or in the parent bean factory hierarchy, e.g. the bean factory of the dispatcher.
author: Erwin Vervaet author: Keith Donald
Field Summary
protected Resource
location The resource from which the document element being parsed was read.
Constructor Summary
public
XmlFlowBuilder(Resource location) Create a new XML flow builder parsing the document at the specified location.
public
XmlFlowBuilder(Resource location, FlowServiceLocator flowServiceLocator) Create a new XML flow builder parsing the document at the specified location, using the provided service locator
to access externally managed flow artifacts.
Create a new XML flow builder parsing the document at the specified location.
Parameters: location - the location of the XML-based flow definition resource
Create a new XML flow builder parsing the document at the specified location, using the provided service locator
to access externally managed flow artifacts.
Parameters: location - the location of the XML-based flow definition resource Parameters: flowServiceLocator - the locator for services needed by this builder to build its Flow
Create a bean factory serving as a local flow service registry.
Parameters: flow - the current flow definition being built Parameters: resources - the file resources to assemble the bean factory from; typically XML-based the bean factory since: 1.0.4
Utility method that returns the first child element identified by its name.
Parameters: ele - the DOM element to analyze Parameters: childEleName - the child element name to look for the org.w3c.dom.Element instance, or null if none found
Register beans in the bean factory local to the flow definition being built.
Subclasses may override this metod to customize the population of the bean factory local to
the flow definition being built; for example, to register mock implementations of services in a test environment.
Parameters: flow - the current flow definition being built Parameters: beanFactory - the bean factory; register local beans with it usingConfigurableBeanFactory.registerSingleton(StringObject) since: 1.0.4
Sets the loader that will load the XML-based flow definition document. Optional, defaults to
DefaultDocumentLoader .
Parameters: documentLoader - the document loader