|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.webflow.definition.registry.ExternalizedFlowDefinitionRegistrar
org.springframework.webflow.engine.builder.xml.XmlFlowRegistrar
public class XmlFlowRegistrar
A flow definition registrar that populates a flow definition registry with flow definitions defined in externalized
XML resources. Typically used in conjunction with a XmlFlowRegistryFactoryBean
but may also be used
standalone in programmatic fashion.
By default, a flow definition registered by this registrar will be assigned a registry identifier equal to the filename of the underlying definition resource, minus the filename extension. For example, a XML-based flow definition defined in the file "flow1.xml" will be identified as "flow1" when registered in a registry.
Programmatic usage example:
BeanFactory beanFactory = ... FlowDefinitionRegistry registry = new FlowDefinitionRegistryImpl(); FlowServiceLocator flowServiceLocator = new DefaultFlowServiceLocator(registry, beanFactory); XmlFlowRegistrar registrar = new XmlFlowRegistrar(flowServiceLocator); File parent = new File("src/webapp/WEB-INF"); registrar.addLocation(new FileSystemResource(new File(parent, "flow1.xml")); registrar.addLocation(new FileSystemResource(new File(parent, "flow2.xml")); registrar.registerFlowDefinitions(registry);
Constructor Summary | |
---|---|
protected |
XmlFlowRegistrar()
Creates a new XML flow registrar. |
|
XmlFlowRegistrar(FlowServiceLocator flowServiceLocator)
Creates a new XML flow registrar. |
Method Summary | |
---|---|
protected FlowBuilder |
createFlowBuilder(org.springframework.core.io.Resource location)
Factory method that creates and fully initializes the XML-based flow definition builder. |
protected FlowDefinitionHolder |
createFlowDefinitionHolder(FlowDefinitionResource resource)
Template factory method subclasses must override to return the holder for the flow definition to be registered loaded from the specified resource. |
DocumentLoader |
getDocumentLoader()
Returns the loader of XML-based flow definition documents. |
protected FlowServiceLocator |
getFlowServiceLocator()
Returns the flow service locator. |
protected boolean |
isFlowDefinitionResource(org.springframework.core.io.Resource resource)
Template method that calculates if the given file resource is actually a flow definition resource. |
void |
setDocumentLoader(DocumentLoader documentLoader)
Sets the loader to load XML-based flow definition documents during flow definition assembly. |
protected void |
setFlowServiceLocator(FlowServiceLocator flowServiceLocator)
Sets the flow service locator. |
Methods inherited from class org.springframework.webflow.definition.registry.ExternalizedFlowDefinitionRegistrar |
---|
addLocation, addLocations, addResource, addResources, createFlowDefinitionResource, register, registerFlowDefinitions, setLocations, setResources, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected XmlFlowRegistrar()
flowServiceLocator
reference is set.
public XmlFlowRegistrar(FlowServiceLocator flowServiceLocator)
flowServiceLocator
- the locator needed to support flow definition assemblyMethod Detail |
---|
protected void setFlowServiceLocator(FlowServiceLocator flowServiceLocator)
flowServiceLocator
- the flow service locator (may not be null)protected FlowServiceLocator getFlowServiceLocator()
public void setDocumentLoader(DocumentLoader documentLoader)
documentLoader
- the document loaderpublic DocumentLoader getDocumentLoader()
protected boolean isFlowDefinitionResource(org.springframework.core.io.Resource resource)
ExternalizedFlowDefinitionRegistrar
isFlowDefinitionResource
in class ExternalizedFlowDefinitionRegistrar
resource
- the underlying resource
protected FlowDefinitionHolder createFlowDefinitionHolder(FlowDefinitionResource resource)
ExternalizedFlowDefinitionRegistrar
createFlowDefinitionHolder
in class ExternalizedFlowDefinitionRegistrar
resource
- the externalized resource
protected FlowBuilder createFlowBuilder(org.springframework.core.io.Resource location)
location
- the xml-based resource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |