org.springframework.webflow.engine.builder
Class AbstractFlowBuildingFlowRegistryFactoryBean

java.lang.Object
  extended by org.springframework.webflow.definition.registry.AbstractFlowDefinitionRegistryFactoryBean
      extended by org.springframework.webflow.engine.builder.AbstractFlowBuildingFlowRegistryFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
Direct Known Subclasses:
AbstractFlowBuilderFlowRegistryFactoryBean, XmlFlowRegistryFactoryBean

public abstract class AbstractFlowBuildingFlowRegistryFactoryBean
extends AbstractFlowDefinitionRegistryFactoryBean
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.ResourceLoaderAware

A base class for factory beans that create populated registries of flow definitions built using a FlowBuilder, typically a BaseFlowBuilder subclass. This base class will setup a FlowServiceLocator for use by the flow builder.

Subclasses should override the doPopulate(FlowDefinitionRegistry) template method to perform the registry population logic, typically delegating to a FlowDefinitionRegistrar strategy.

Author:
Keith Donald
See Also:
FlowDefinitionRegistry, FlowDefinitionRegistrar

Constructor Summary
AbstractFlowBuildingFlowRegistryFactoryBean()
           
 
Method Summary
protected  FlowServiceLocator createFlowServiceLocator()
          Factory method for creating the service locator used to locate webflow services during flow assembly.
protected abstract  void doPopulate(FlowDefinitionRegistry registry)
          Template method subclasses must override to perform registry population.
protected  org.springframework.beans.factory.BeanFactory getBeanFactory()
          Returns the bean factory managing this bean.
protected  BeanInvokingActionFactory getBeanInvokingActionFactory()
          Returns the factory for creating bean invoking actions, actions that adapt methods on objects to the Action interface.
protected  org.springframework.binding.convert.ConversionService getConversionService()
          Returns the conversion service to use to convert between types; typically from string to a rich object type.
protected  org.springframework.binding.expression.ExpressionParser getExpressionParser()
          Returns the expression parser responsible for parsing expression strings into evaluatable expression objects.
protected  FlowArtifactFactory getFlowArtifactFactory()
          Returns the factory encapsulating the creation of central Flow artifacts such as flows and states.
protected  FlowServiceLocator getFlowServiceLocator()
          Returns the strategy for locating dependent artifacts when a flow is being built.
protected  org.springframework.core.io.ResourceLoader getResourceLoader()
          Returns the injected resource loader.
protected  void init()
          Template method subclasses may override to perform factory bean initialization logic before registry population.
protected  void init(FlowServiceLocator flowServiceLocator)
          Called after properties have been set on the service locator, but before registry population.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setBeanInvokingActionFactory(BeanInvokingActionFactory beanInvokingActionFactory)
          Sets the factory for creating bean invoking actions, actions that adapt methods on objects to the Action interface.
 void setConversionService(org.springframework.binding.convert.ConversionService conversionService)
          Set the conversion service to use to convert between types; typically from string to a rich object type.
 void setExpressionParser(org.springframework.binding.expression.ExpressionParser expressionParser)
          Set the expression parser responsible for parsing expression strings into evaluatable expression objects.
 void setFlowArtifactFactory(FlowArtifactFactory flowArtifactFactory)
          Sets the factory encapsulating the creation of central Flow artifacts such as flows and states.
 void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
           
 
Methods inherited from class org.springframework.webflow.definition.registry.AbstractFlowDefinitionRegistryFactoryBean
afterPropertiesSet, createFlowDefinitionRegistry, getObject, getObjectType, getRegistry, isSingleton, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFlowBuildingFlowRegistryFactoryBean

public AbstractFlowBuildingFlowRegistryFactoryBean()
Method Detail

getFlowArtifactFactory

protected FlowArtifactFactory getFlowArtifactFactory()
Returns the factory encapsulating the creation of central Flow artifacts such as flows and states.


setFlowArtifactFactory

public void setFlowArtifactFactory(FlowArtifactFactory flowArtifactFactory)
Sets the factory encapsulating the creation of central Flow artifacts such as flows and states.


getBeanInvokingActionFactory

protected BeanInvokingActionFactory getBeanInvokingActionFactory()
Returns the factory for creating bean invoking actions, actions that adapt methods on objects to the Action interface.


setBeanInvokingActionFactory

public void setBeanInvokingActionFactory(BeanInvokingActionFactory beanInvokingActionFactory)
Sets the factory for creating bean invoking actions, actions that adapt methods on objects to the Action interface.


getExpressionParser

protected org.springframework.binding.expression.ExpressionParser getExpressionParser()
Returns the expression parser responsible for parsing expression strings into evaluatable expression objects.


setExpressionParser

public void setExpressionParser(org.springframework.binding.expression.ExpressionParser expressionParser)
Set the expression parser responsible for parsing expression strings into evaluatable expression objects.


getConversionService

protected org.springframework.binding.convert.ConversionService getConversionService()
Returns the conversion service to use to convert between types; typically from string to a rich object type.


setConversionService

public void setConversionService(org.springframework.binding.convert.ConversionService conversionService)
Set the conversion service to use to convert between types; typically from string to a rich object type.


getResourceLoader

protected org.springframework.core.io.ResourceLoader getResourceLoader()
Returns the injected resource loader.


setResourceLoader

public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Specified by:
setResourceLoader in interface org.springframework.context.ResourceLoaderAware

getBeanFactory

protected org.springframework.beans.factory.BeanFactory getBeanFactory()
Returns the bean factory managing this bean.


setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware

init

protected final void init()
Description copied from class: AbstractFlowDefinitionRegistryFactoryBean
Template method subclasses may override to perform factory bean initialization logic before registry population. Will be called before AbstractFlowDefinitionRegistryFactoryBean.doPopulate(FlowDefinitionRegistry). The default implementation is empty.

Overrides:
init in class AbstractFlowDefinitionRegistryFactoryBean

createFlowServiceLocator

protected FlowServiceLocator createFlowServiceLocator()
Factory method for creating the service locator used to locate webflow services during flow assembly. Subclasses may override to customize the instantiation and configuration of the locator returned.

Returns:
the service locator

init

protected void init(FlowServiceLocator flowServiceLocator)
Called after properties have been set on the service locator, but before registry population. Subclasses may override to perform custom initialization of the flow service locator.

Parameters:
flowServiceLocator - the flow service locator to use to locate externally managed services needed during flow building and assembly, typically used by a FlowDefinitionRegistrar

getFlowServiceLocator

protected FlowServiceLocator getFlowServiceLocator()
Returns the strategy for locating dependent artifacts when a flow is being built. May be called by subclasses during registry population to wire in the service locator needed for flow assembly.


doPopulate

protected abstract void doPopulate(FlowDefinitionRegistry registry)
Description copied from class: AbstractFlowDefinitionRegistryFactoryBean
Template method subclasses must override to perform registry population.

Specified by:
doPopulate in class AbstractFlowDefinitionRegistryFactoryBean
Parameters:
registry - the flow definition registry to populate


Copyright © 2004-2007. All Rights Reserved.