|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.portlet.context.PortletApplicationObjectSupport
org.springframework.web.portlet.handler.PortletContentGenerator
org.springframework.web.portlet.mvc.AbstractController
org.springframework.webflow.executor.mvc.PortletFlowController
public class PortletFlowController
Point of integration between Spring Portlet MVC and Spring Web Flow: a Controller
that routes incoming
portlet requests to one or more managed flow executions.
Requests into the web flow system are handled by a FlowExecutor
, which this class delegates to. Consult the
JavaDoc of that class for more information on how requests are processed.
Note: a single PortletFlowController
may execute all flows within your application. See the
phonebook-portlet
sample application for examples of the various strategies for launching and resuming
flow executions in a Portlet environment.
It is also possible to customize the FlowExecutorArgumentHandler
strategy to allow for different types of
controller parameterization, for example perhaps in conjunction with a REST-style request mapper.
Integrating Spring Web Flow into a Portlet environment puts some minor contraints on your flows. These constraints result from technical limitations in the Portlet API, for instance the fact that a render request cannot issue a redirect. Keep the following in mind when developing Portlets using Spring Web Flow:
FlowExecutionRedirect
is not supportd.FlowDefinitionRedirect
or an ExternalRedirect
.
FlowExecutor
,
FlowExecutorArgumentHandler
Field Summary |
---|
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
PortletFlowController()
Create a new portlet flow controller. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected java.lang.String |
convertToString(java.lang.Object object)
Converts the object to a string. |
FlowExecutorArgumentHandler |
getArgumentHandler()
Returns the flow executor argument handler used by this controller. |
FlowExecutor |
getFlowExecutor()
Returns the flow executor used by this controller. |
protected void |
handleActionRequestInternal(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
protected org.springframework.web.portlet.ModelAndView |
handleRenderRequestInternal(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
void |
setArgumentHandler(FlowExecutorArgumentHandler argumentHandler)
Sets the flow executor argument handler to use. |
void |
setDefaultFlowId(java.lang.String defaultFlowId)
Sets the identifier of the default flow to launch if no flowId argument can be extracted by the configured FlowExecutorArgumentHandler during render request processing. |
void |
setFlowExecutor(FlowExecutor flowExecutor)
Configures the flow executor implementation to use. |
protected org.springframework.web.portlet.ModelAndView |
toModelAndView(ResponseInstruction responseInstruction)
Convert given response instruction into a Spring Portlet MVC model and view. |
Methods inherited from class org.springframework.web.portlet.mvc.AbstractController |
---|
handleActionRequest, handleRenderRequest, isRenderWhenMinimized, isSynchronizeOnSession, setRenderWhenMinimized, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.portlet.handler.PortletContentGenerator |
---|
applyCacheSeconds, cacheForSeconds, check, checkAndPrepare, checkAndPrepare, getCacheSeconds, isRequireSession, preventCaching, setCacheSeconds, setRequireSession |
Methods inherited from class org.springframework.web.portlet.context.PortletApplicationObjectSupport |
---|
getPortletContext, getTempDir, isContextRequired, setPortletContext |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PortletFlowController()
setFlowExecutor(FlowExecutor)
,
setArgumentHandler(FlowExecutorArgumentHandler)
Method Detail |
---|
public FlowExecutor getFlowExecutor()
public void setFlowExecutor(FlowExecutor flowExecutor)
flowExecutor
- the fully configured flow executorpublic FlowExecutorArgumentHandler getArgumentHandler()
public void setArgumentHandler(FlowExecutorArgumentHandler argumentHandler)
argumentHandler
- the fully configured argument handlerpublic void setDefaultFlowId(java.lang.String defaultFlowId)
FlowExecutorArgumentHandler
during render request processing.
This is a convenience method that sets the default flow id of the controller's argument handler. Don't use this
when using setArgumentHandler(FlowExecutorArgumentHandler)
.
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
protected org.springframework.web.portlet.ModelAndView handleRenderRequestInternal(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws java.lang.Exception
handleRenderRequestInternal
in class org.springframework.web.portlet.mvc.AbstractController
java.lang.Exception
protected void handleActionRequestInternal(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws java.lang.Exception
handleActionRequestInternal
in class org.springframework.web.portlet.mvc.AbstractController
java.lang.Exception
protected java.lang.String convertToString(java.lang.Object object)
String.valueOf(Object)
by default.
object
- the object
protected org.springframework.web.portlet.ModelAndView toModelAndView(ResponseInstruction responseInstruction)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |