Spring Web Flow

org.springframework.webflow.engine
Class FlowVariable

java.lang.Object
  

extended by org.springframework.webflow.core.AnnotatedObject
      extended by org.springframework.webflow.engine.FlowVariable
All Implemented Interfaces:
Annotated

public class FlowVariable
extends AnnotatedObject

A value object that defines a specification for a flow variable. Such a variable is allocated when a flow starts and destroyed when that flow ends. This class encapsulates information about the variable and the behavior necessary to allocate the variable instance in flow scope.

Author:
Keith Donald

Field Summary
 
Fields inherited from class org.springframework.webflow.core.AnnotatedObject
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
 
Constructor Summary
FlowVariable(java.lang.String name, VariableValueFactory valueFactory)
          Creates a new flow variable.
 
Method Summary
 void create(RequestContext context)
          Creates this flow variable.
 java.lang.Object destroy(RequestContext context)
          Destroys this flow variable.
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Returns the name of this variable.
 int hashCode()
           
 void restore(RequestContext context)
          Restores this variable's dependencies.
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.webflow.core.AnnotatedObject
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,
                    VariableValueFactory valueFactory)
Creates a new flow variable.

Parameters:
name - the variable name
Method Detail

getName

public java.lang.String getName()
Returns the name 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 void create(RequestContext context)
Creates this flow variable. This method allocates the variable's value in the correct flow scope.

Parameters:
context - the executing flow

restore

public void restore(RequestContext context)
Restores this variable's dependencies. This method asks the variable's value factory to restore any references the variable has to transient objects.

Parameters:
context - the executing flow

destroy

public java.lang.Object destroy(RequestContext context)
Destroys this flow variable. This method removes the variable's value in the correct flow scope.

Parameters:
context - the executing flow

toString

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

Spring Web Flow