Added invoke(String, Action) method to AbstractFlowBuilder.

This commit is contained in:
Erwin Vervaet
2007-05-09 08:35:35 +00:00
parent 8d491cba01
commit 106caa61b1
2 changed files with 24 additions and 1 deletions

View File

@@ -16,6 +16,9 @@ Package org.springframework.webflow.conversation
* Each SessionBindingConversationManager now uses a unique key to store it's conversation container
in the session (SWF-304).
Package org.springframework.webflow.engine
* Added invoke(String, Action) method to AbstractFlowBuilder.
Package org.springframework.webflow.executor
* JSF integration code now manages flow execution locks properly in exceptional situations and when the
RENDER RESPONSE phase is bypassed (SWF-302).

View File

@@ -22,6 +22,7 @@ import org.springframework.binding.mapping.Mapping;
import org.springframework.binding.mapping.MappingBuilder;
import org.springframework.binding.method.MethodSignature;
import org.springframework.core.style.ToStringCreator;
import org.springframework.util.Assert;
import org.springframework.webflow.action.AbstractBeanInvokingAction;
import org.springframework.webflow.action.ActionResultExposer;
import org.springframework.webflow.action.BeanInvokingActionFactory;
@@ -640,13 +641,32 @@ public abstract class AbstractFlowBuilder extends BaseFlowBuilder {
* @param multiAction the multi action
* @return the annotated action that when invoked sets up a context property
* used by the multi action to instruct it with what method to invoke
* @since 1.0.4
*/
protected AnnotatedAction invoke(String methodName, MultiAction multiAction) throws FlowArtifactLookupException {
protected AnnotatedAction invoke(String methodName, Action multiAction) throws FlowArtifactLookupException {
Assert.isInstanceOf(MultiAction.class, multiAction,
"The action passed into invoke() should be a MultiAction");
AnnotatedAction action = new AnnotatedAction(multiAction);
action.setMethod(methodName);
return action;
}
/**
* Creates an annotated action decorator that instructs the specified method
* be invoked on the multi action when it is executed. Use this when working
* with MultiActions to specify the method on the MultiAction to invoke for
* a particular usage scenario. Use the {@link #method(String)} factory
* method when working with
* {@link AbstractBeanInvokingAction bean invoking actions}.
* @param methodName the name of the method on the multi action instance
* @param multiAction the multi action
* @return the annotated action that when invoked sets up a context property
* used by the multi action to instruct it with what method to invoke
*/
protected AnnotatedAction invoke(String methodName, MultiAction multiAction) throws FlowArtifactLookupException {
return invoke(methodName, (Action)multiAction);
}
/**
* Request that the attribute mapper with the specified name be used to map
* attributes between a parent flow and a spawning subflow when the subflow