org.springframework.webflow.engine.support
Class BeanFactoryFlowVariable

java.lang.Object
  extended by org.springframework.webflow.engine.AnnotatedObject
      extended by org.springframework.webflow.engine.FlowVariable
          extended by org.springframework.webflow.engine.support.BeanFactoryFlowVariable
All Implemented Interfaces:
java.io.Serializable, Annotated

public class BeanFactoryFlowVariable
extends FlowVariable

A concrete flow variable subclass that obtains variable values from a Spring BeanFactory.

Author:
Keith Donald, Erwin Vervaet
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.webflow.engine.AnnotatedObject
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
 
Constructor Summary
BeanFactoryFlowVariable(java.lang.String name, org.springframework.beans.factory.BeanFactory beanFactory, ScopeType scope)
          Convenience constructor to create a new bean factory flow variable.
BeanFactoryFlowVariable(java.lang.String variableName, java.lang.String beanName, org.springframework.beans.factory.BeanFactory beanFactory, ScopeType scope)
          Creates a new bean factory flow variable.
 
Method Summary
protected  java.lang.Object createVariableValue(RequestContext context)
          Hook method that needs to be implemented by subclasses to calculate the value of this flow variable based on the information available in the request context.
 
Methods inherited from class org.springframework.webflow.engine.FlowVariable
create, equals, getName, getScope, hashCode, toString
 
Methods inherited from class org.springframework.webflow.engine.AnnotatedObject
getAttributeMap, getAttributes, getCaption, getDescription, setCaption, setDescription
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanFactoryFlowVariable

public BeanFactoryFlowVariable(java.lang.String name,
                               org.springframework.beans.factory.BeanFactory beanFactory,
                               ScopeType scope)
Convenience constructor to create a new bean factory flow variable. Defaults the bean name to the variable name.

Parameters:
name - the variable name which will also be used as the bean name
beanFactory - the bean factory where initial variable values will be obtained
scope - the variable scope
Since:
1.0.2

BeanFactoryFlowVariable

public BeanFactoryFlowVariable(java.lang.String variableName,
                               java.lang.String beanName,
                               org.springframework.beans.factory.BeanFactory beanFactory,
                               ScopeType scope)
Creates a new bean factory flow variable.

Parameters:
variableName - the variable name
beanName - the bean name, will default to the variable name if not specified
beanFactory - the bean factory where initial variable values will be obtained
scope - the variable scope
Method Detail

createVariableValue

protected java.lang.Object createVariableValue(RequestContext context)
Description copied from class: FlowVariable
Hook method that needs to be implemented by subclasses to calculate the value of this flow variable based on the information available in the request context.

Specified by:
createVariableValue in class FlowVariable
Parameters:
context - the flow execution request context
Returns:
the flow variable value


Copyright © 2004-2007. All Rights Reserved.