java.lang.Object | |
↳ | org.springframework.web.portlet.handler.SimplePortletHandlerAdapter |
Adapter to use the Portlet interface with the generic DispatcherPortlet.
Calls the Portlet's render
and processAction
methods to handle a request.
This adapter is not activated by default; it needs to be defined as a bean in the DispatcherPortlet context. It will automatically apply to mapped handler beans that implement the Portlet interface then.
Note that Portlet instances defined as bean will not receive initialization and destruction callbacks, unless a special post-processor such as SimplePortletPostProcessor is defined in the DispatcherPortlet context.
Alternatively, consider wrapping a Portlet with Spring's PortletWrappingController. This is particularly appropriate for existing Portlet classes, allowing to specify Portlet initialization parameters, etc.
SimplePortletPostProcessor
PortletWrappingController
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Use the given handler to handle this action request.
| |||||||||||
Use the given handler to handle this event request.
| |||||||||||
Use the given handler to handle this render request.
| |||||||||||
Use the given handler to handle this resource request.
| |||||||||||
Set the PortletContext that this object runs in.
| |||||||||||
Given a handler instance, return whether or not this HandlerAdapter can
support it.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.web.portlet.HandlerAdapter
| |||||||||||
From interface
org.springframework.web.portlet.context.PortletContextAware
|
Use the given handler to handle this action request. The workflow that is required may vary widely.
request | current action request |
---|---|
response | current action response |
handler | handler to use. This object must have previously been passed
to the supports method of this interface, which must have
returned true. |
Exception |
---|
Use the given handler to handle this event request. The workflow that is required may vary widely.
request | current action request |
---|---|
response | current action response |
handler | handler to use. This object must have previously been passed
to the supports method of this interface, which must have
returned true. |
Exception |
---|
Use the given handler to handle this render request. The workflow that is required may vary widely.
request | current render request |
---|---|
response | current render response |
handler | handler to use. This object must have previously been passed
to the supports method of this interface, which must have
returned true . |
null
if the request has been handled directlyException |
---|
Use the given handler to handle this resource request. The workflow that is required may vary widely.
request | current render request |
---|---|
response | current render response |
handler | handler to use. This object must have previously been passed
to the supports method of this interface, which must have
returned true . |
null
if the request has been handled directlyException |
---|
Set the PortletContext that this object runs in.
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked after ApplicationContextAware's setApplicationContext.
portletContext | PortletContext object to be used by this object |
---|
Given a handler instance, return whether or not this HandlerAdapter can support it. Typical HandlerAdapters will base the decision on the handler type. HandlerAdapters will usually only support one handler type each.
A typical implementation:
return (handler instanceof MyHandler);
handler | handler object to check |
---|