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
ConstructorsConstructorDescriptionDefaultFlowModelHolder(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.ResourceReturns the underlying resource defining the flow model.booleanHas the underlying flow model changed since it was last accessed via a call toFlowModelHolder.getFlowModel().voidrefresh()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:FlowModelHolderReturns the flow model held by this holder. Calling this method the first time may trigger flow model assembly.- Specified by:
getFlowModelin interfaceFlowModelHolder
-
getFlowModelResource
public org.springframework.core.io.Resource getFlowModelResource()Description copied from interface:FlowModelHolderReturns the underlying resource defining the flow model.- Specified by:
getFlowModelResourcein interfaceFlowModelHolder- Returns:
- the flow model resource
-
hasFlowModelChanged
public boolean hasFlowModelChanged()Description copied from interface:FlowModelHolderHas the underlying flow model changed since it was last accessed via a call toFlowModelHolder.getFlowModel().- Specified by:
hasFlowModelChangedin interfaceFlowModelHolder- Returns:
- true if yes, false if not
-
refresh
public void refresh()Description copied from interface:FlowModelHolderRefresh 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:
refreshin interfaceFlowModelHolder
-
toString
-