|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolder
public class RefreshableFlowDefinitionHolder
A flow definition holder that can detect changes on an underlying flow definition resource and refresh that resource automatically.
This class is threadsafe.
Note that this FlowDefinition
holder uses a Flow
assembler. This is normal since a Flow
is a
FlowDefinition
! This class bridges the abstract world of flow definitions
with the concrete world of flow implementations
.
FlowDefinition
,
Flow
,
FlowAssembler
Constructor Summary | |
---|---|
RefreshableFlowDefinitionHolder(FlowAssembler assembler)
Creates a new refreshable flow definition holder that uses the configured assembler (GOF director) to drive flow assembly, on initial use and on any resource change or refresh. |
Method Summary | |
---|---|
protected void |
assembleFlow()
Assemble the held flow definition, delegating to the configured FlowAssembler (director). |
protected long |
calculateLastModified()
Helper that retrieves the last modified date by querying the backing flow resource. |
protected FlowBuilder |
getFlowBuilder()
Returns the flow builder that actually builds the Flow definition. |
FlowDefinition |
getFlowDefinition()
Returns the flow definition held by this holder. |
java.lang.String |
getFlowDefinitionId()
Returns the id of the flow definition held by this holder. |
protected long |
getLastModified()
Returns the last modifed date of the backed flow definition resource. |
protected boolean |
isAssembled()
Returns a flag indicating if this holder has performed and completed flow definition assembly. |
protected boolean |
isAssembling()
Returns a flag indicating if this holder is performing assembly. |
void |
refresh()
Refresh the flow definition held by this holder. |
protected void |
refreshIfChanged()
Reassemble the flow if its underlying resource has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RefreshableFlowDefinitionHolder(FlowAssembler assembler)
assembler
- the flow assembler to useMethod Detail |
---|
public java.lang.String getFlowDefinitionId()
FlowDefinitionHolder
id
of the flow definition held by this holder. This is a lightweight method
callers may call to obtain the id of the flow without triggering full flow definition assembly (which may be an
expensive operation).
getFlowDefinitionId
in interface FlowDefinitionHolder
public FlowDefinition getFlowDefinition() throws FlowDefinitionConstructionException
FlowDefinitionHolder
getFlowDefinition
in interface FlowDefinitionHolder
FlowDefinitionConstructionException
- if there is a problem constructing the target flow definitionpublic void refresh() throws FlowBuilderException
FlowDefinitionHolder
refresh
in interface FlowDefinitionHolder
FlowBuilderException
protected FlowBuilder getFlowBuilder()
protected void refreshIfChanged()
protected long calculateLastModified()
protected long getLastModified()
protected void assembleFlow() throws FlowBuilderException
FlowBuilderException
protected boolean isAssembled()
protected boolean isAssembling()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |