Class FlowVariable

java.lang.Object
org.springframework.webflow.core.AnnotatedObject
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
  • Constructor Details

    • FlowVariable

      public FlowVariable(String name, VariableValueFactory valueFactory)
      Creates a new flow variable.
      Parameters:
      name - the variable name
  • Method Details

    • getName

      public String getName()
      Returns the name of this variable.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class 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 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 String toString()
      Overrides:
      toString in class Object