org.springframework.webflow.engine
Class FlowVariable

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

public abstract class FlowVariable
extends AnnotatedObject
implements java.io.Serializable

A value object that defines a specification for a flow variable. Encapsulates information about the variable and the behavior necessary to create a new variable instance in a flow execution scope.

Author:
Keith Donald
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.webflow.engine.AnnotatedObject
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
 
Constructor Summary
FlowVariable(java.lang.String name, ScopeType scope)
          Creates a new flow variable.
 
Method Summary
 void create(RequestContext context)
          Creates a new instance of this flow variable in the configured scope.
protected abstract  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.
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Returns the name of this variable.
 ScopeType getScope()
          Returns the scope of this variable.
 int hashCode()
           
 java.lang.String 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

FlowVariable

public FlowVariable(java.lang.String name,
                    ScopeType scope)
Creates a new flow variable.

Parameters:
name - the variable name
scope - the variable scope type
Method Detail

getName

public java.lang.String getName()
Returns the name of this variable.


getScope

public ScopeType getScope()
Returns the scope of this variable.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

create

public final void create(RequestContext context)
Creates a new instance of this flow variable in the configured scope.

Parameters:
context - the flow execution request context

createVariableValue

protected abstract 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.

Parameters:
context - the flow execution request context
Returns:
the flow variable value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2007. All Rights Reserved.