Added initBuilder() hook method to AbstractFlowBuilder.

This commit is contained in:
Erwin Vervaet
2007-05-09 09:42:29 +00:00
parent 49f86a4d99
commit 22bdf88ad3
2 changed files with 11 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ Package org.springframework.webflow.conversation
Package org.springframework.webflow.engine
* Added invoke(String, Action) method to AbstractFlowBuilder.
* Added initBuilder() hook method to AbstractFlowBuilder.
Package org.springframework.webflow.execution
* Added a holder for the FlowExecutionContext of a request (SWF-163).

View File

@@ -185,6 +185,7 @@ public abstract class AbstractFlowBuilder extends BaseFlowBuilder {
public void init(String flowId, AttributeMap attributes) throws FlowBuilderException {
setFlow(getFlowArtifactFactory().createFlow(flowId, flowAttributes().union(attributes)));
initBuilder();
}
/**
@@ -196,6 +197,15 @@ public abstract class AbstractFlowBuilder extends BaseFlowBuilder {
protected AttributeMap flowAttributes() {
return CollectionUtils.EMPTY_ATTRIBUTE_MAP;
}
/**
* Hook method subclasses can override to initialize the flow builder.
* Will be called by {@link #init(String, AttributeMap)} after
* creating the initial Flow object. As a consequence, {@link #getFlow()}
* can be called to retrieve the Flow object under construction.
*/
protected void initBuilder() {
}
// view state