Class DefaultFlowModelHolder

java.lang.Object
org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder
All Implemented Interfaces:
FlowModelHolder

public class DefaultFlowModelHolder extends Object implements FlowModelHolder
A flow model holder that can detect changes on an underlying flow model resource and refresh that resource automatically.

This class is thread-safe.

Note that this FlowModel holder uses a FlowModelBuilder.

Author:
Keith Donald, Scott Andrews
See Also:
  • Constructor Details

    • DefaultFlowModelHolder

      public DefaultFlowModelHolder(FlowModelBuilder flowModelBuilder)
      Creates a new refreshable flow model holder that uses the configured assembler (GOF director) to drive flow assembly, on initial use and on any resource change or refresh.
      Parameters:
      flowModelBuilder - the flow model builder to use
  • Method Details

    • getFlowModel

      public FlowModel getFlowModel()
      Description copied from interface: FlowModelHolder
      Returns the flow model held by this holder. Calling this method the first time may trigger flow model assembly.
      Specified by:
      getFlowModel in interface FlowModelHolder
    • getFlowModelResource

      public org.springframework.core.io.Resource getFlowModelResource()
      Description copied from interface: FlowModelHolder
      Returns the underlying resource defining the flow model.
      Specified by:
      getFlowModelResource in interface FlowModelHolder
      Returns:
      the flow model resource
    • hasFlowModelChanged

      public boolean hasFlowModelChanged()
      Description copied from interface: FlowModelHolder
      Has the underlying flow model changed since it was last accessed via a call to FlowModelHolder.getFlowModel().
      Specified by:
      hasFlowModelChanged in interface FlowModelHolder
      Returns:
      true if yes, false if not
    • refresh

      public void refresh()
      Description copied from interface: FlowModelHolder
      Refresh the flow model held by this holder. Calling this method typically triggers flow re-assembly, which may include a refresh from an externalized resource such as a file.
      Specified by:
      refresh in interface FlowModelHolder
    • toString

      public String toString()
      Overrides:
      toString in class Object