Class DefaultFlowModelHolder
java.lang.Object
org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionDefaultFlowModelHolder
(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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the flow model held by this holder.org.springframework.core.io.Resource
Returns the underlying resource defining the flow model.boolean
Has the underlying flow model changed since it was last accessed via a call toFlowModelHolder.getFlowModel()
.void
refresh()
Refresh the flow model held by this holder.toString()
-
Constructor Details
-
DefaultFlowModelHolder
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
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 interfaceFlowModelHolder
-
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 interfaceFlowModelHolder
- 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 toFlowModelHolder.getFlowModel()
.- Specified by:
hasFlowModelChanged
in interfaceFlowModelHolder
- 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 interfaceFlowModelHolder
-
toString
-