public class XmlFlowModelBuilder extends java.lang.Object implements FlowModelBuilder
Constructor and Description |
---|
XmlFlowModelBuilder(org.springframework.core.io.Resource resource)
Create a new XML flow model builder that will parse the XML document at the specified resource location and use
the provided locator to access parent flow models.
|
XmlFlowModelBuilder(org.springframework.core.io.Resource resource,
FlowModelLocator modelLocator)
Create a new XML flow model builder that will parse the XML document at the specified resource location and use
the provided locator to access parent flow models.
|
Modifier and Type | Method and Description |
---|---|
void |
build()
Builds any variables initialized by the flow when it starts.
|
void |
dispose()
Shutdown the builder, releasing any resources it holds.
|
protected org.w3c.dom.Document |
getDocument()
Returns the DOM document parsed from the XML file.
|
protected org.w3c.dom.Element |
getDocumentElement()
Returns the root document element.
|
FlowModel |
getFlowModel()
Get the fully constructed flow model.
|
org.springframework.core.io.Resource |
getFlowModelResource()
Get the underlying flow model resource accessed to build this flow model.
|
boolean |
hasFlowModelResourceChanged()
Returns true if the underlying flow model resource has changed since the last call to
FlowModelBuilder.init() . |
void |
init()
Initialize this builder.
|
void |
setDocumentLoader(DocumentLoader documentLoader)
Sets the loader that will load the XML-based flow definition document.
|
java.lang.String |
toString() |
public XmlFlowModelBuilder(org.springframework.core.io.Resource resource)
resource
- the path to the XML flow definition (required)public XmlFlowModelBuilder(org.springframework.core.io.Resource resource, FlowModelLocator modelLocator)
resource
- the path to the XML flow definition (required)modelLocator
- a locator for parent flow models to support flow inheritancepublic void setDocumentLoader(DocumentLoader documentLoader)
DefaultDocumentLoader
.documentLoader
- the document loaderpublic void init() throws FlowModelBuilderException
FlowModelBuilder
init
in interface FlowModelBuilder
FlowModelBuilderException
- an exception occurred building the flowpublic void build() throws FlowModelBuilderException
FlowModelBuilder
build
in interface FlowModelBuilder
FlowModelBuilderException
- an exception occurred building the flowpublic FlowModel getFlowModel() throws FlowModelBuilderException
FlowModelBuilder
getFlowModel
in interface FlowModelBuilder
FlowModelBuilderException
- an exception occurred building this flowpublic void dispose() throws FlowModelBuilderException
FlowModelBuilder
FlowModelBuilder.init()
method.dispose
in interface FlowModelBuilder
FlowModelBuilderException
- an exception occurred disposing this flowpublic org.springframework.core.io.Resource getFlowModelResource()
FlowModelBuilder
getFlowModelResource
in interface FlowModelBuilder
public boolean hasFlowModelResourceChanged()
FlowModelBuilder
FlowModelBuilder.init()
. Always
returns false if the flow model is not build from a resource.hasFlowModelResourceChanged
in interface FlowModelBuilder
protected org.w3c.dom.Document getDocument()
protected org.w3c.dom.Element getDocumentElement()
public java.lang.String toString()
toString
in class java.lang.Object