This commit is contained in:
Keith Donald
2008-04-23 23:10:26 +00:00
parent b488b23dd3
commit 5384bfedc0
3 changed files with 16 additions and 4 deletions

View File

@@ -44,6 +44,14 @@ import org.springframework.webflow.execution.repository.NoSuchFlowExecutionExcep
import org.springframework.webflow.executor.FlowExecutionResult;
import org.springframework.webflow.executor.FlowExecutor;
/**
* A custom MVC HandlerAdapter that encapsulates the generic workflow associated with executing flows in a Portlet
* environment. Delegates to mapped {@link FlowHandler flow handlers} to manage the interaction with executions of
* specific flow definitions.
*
* @author Keith Donald
* @author Scott Andrews
*/
public class FlowHandlerAdapter extends PortletApplicationObjectSupport implements HandlerAdapter, InitializingBean {
private static final String ACTION_REQUEST_FLOW_EXCEPTION_ATTRIBUTE = "actionRequestFlowException";
@@ -152,8 +160,11 @@ public class FlowHandlerAdapter extends PortletApplicationObjectSupport implemen
}
protected MutableAttributeMap defaultCreateFlowExecutionInputMap(PortletRequest request) {
LocalAttributeMap inputMap = new LocalAttributeMap();
Map parameterMap = request.getParameterMap();
if (parameterMap.size() == 0) {
return null;
}
LocalAttributeMap inputMap = new LocalAttributeMap();
Iterator it = parameterMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();

View File

@@ -45,8 +45,9 @@ import org.springframework.webflow.executor.FlowExecutionResult;
import org.springframework.webflow.executor.FlowExecutor;
/**
* A custom MVC HandlerAdapter that encapsulates the generic workflow associated with executing flows. Delegates to
* mapped {@link FlowHandler flow handlers} to manage the interaction with executions of specific flow definitions.
* A custom MVC HandlerAdapter that encapsulates the generic workflow associated with executing flows in a Servlet
* environment. Delegates to mapped {@link FlowHandler flow handlers} to manage the interaction with executions of
* specific flow definitions.
*
* @author Keith Donald
*/

View File

@@ -40,7 +40,7 @@ public class FlowHandlerAdapterTests extends TestCase {
private PortletExternalContext actionContext;
private PortletExternalContext renderContext;
private FlowHandler flowHandler;
private LocalAttributeMap flowInput = new LocalAttributeMap();
private LocalAttributeMap flowInput = null;
private boolean handleException;
private boolean handleExecutionOutcome;
private boolean handleExecutionOutcomeCalled;