org.springframework.web.portlet.handler |
Provides standard HandlerMapping implementations,
including abstract base classes for custom implementations.
|
Java Source File Name | Type | Comment |
AbstractHandlerMapping.java | Class | Abstract base class for
org.springframework.web.portlet.HandlerMapping implementations. |
AbstractMapBasedHandlerMapping.java | Class | Abstract base class for HandlerMapping implementations that rely on a map
which caches handler objects per lookup key. |
HandlerInterceptorAdapter.java | Class | Abstract adapter class for the HandlerInterceptor interface,
for simplified implementation of pre-only/post-only interceptors.
author: Juergen Hoeller author: John A. |
ParameterHandlerMapping.java | Class | Implementation of the HandlerMapping interface to map from a request
parameter to request handler beans.
The default name of the parameter is "action", but can be changed using
ParameterHandlerMapping.setParameterName setParameterName() .
The bean configuration for this mapping will look somthing like this:
<bean id="parameterHandlerMapping" class="org.springframework.web.portlet.handler.ParameterHandlerMapping">
<property name="parameterMap">
<map>
<entry key="add"><ref bean="addItemHandler"/></entry>
<entry key="edit"><ref bean="editItemHandler"/></entry>
<entry key="delete"><ref bean="deleteItemHandler"/></entry>
</map>
</property>
</bean>
Thanks to Rainer Schmitz for suggesting this mapping strategy!
author: John A. |
ParameterMappingInterceptor.java | Class | Interceptor to forward a request parameter from the ActionRequest to the
RenderRequest .
This can be useful when using
ParameterHandlerMapping ParameterHandlerMapping or
PortletModeParameterHandlerMapping PortletModeParameterHandlerMapping .
It will ensure that the parameter that was used to map the ActionRequest
to a handler will be forwarded to the RenderRequest so that it will also be
mapped the same way.
When using this Interceptor, you can still change the value of the mapping parameter
in your handler in order to change where the render request will get mapped.
Be aware that this Interceptor does call ActionResponse.setRenderParameter ,
which means that you will not be able to call ActionResponse.sendRedirect in
your handler. |
PortletContentGenerator.java | Class | Convenient superclass for any kind of web content generator,
like AbstractController. |
PortletModeHandlerMapping.java | Class | Implementation of the HandlerMapping interface to map from
the current PortletMode to request handler beans.
The bean configuration for this mapping will look something like this:
<bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
<property name="portletModeMap">
<map>
<entry key="view"><ref bean="viewHandler"/></entry>
<entry key="edit"><ref bean="editHandler"/></entry>
<entry key="help"><ref bean="helpHandler"/></entry>
</map>
</property>
</bean>
author: William G. |
PortletModeParameterHandlerMapping.java | Class | Implementation of the HandlerMapping interface to map from
the current PortletMode and a request parameter to request handler beans.
The mapping consists of two levels: first the PortletMode and then the
parameter value. |
PortletSessionRequiredException.java | Class | Exception thrown when a portlet content generator requires a pre-existing session.
author: John A. |
SimpleMappingExceptionResolver.java | Class | org.springframework.web.portlet.HandlerExceptionResolver implementation
that allows for mapping exception class names to view names, either for a
set of given handlers or for all handlers in the DispatcherPortlet.
Error views are analogous to error page JSPs, but can be used with any
kind of exception including any checked one, with fine-granular mappings for
specific handlers.
author: Juergen Hoeller author: John A. |
SimplePortletHandlerAdapter.java | Class | 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. |
SimplePortletPostProcessor.java | Class | Bean post-processor that applies initialization and destruction callbacks
to beans that implement the Portlet interface.
After initialization of the bean instance, the Portlet init
method will be called with a PortletConfig that contains the bean name
of the Portlet and the PortletContext that it is running in.
Before destruction of the bean instance, the Portlet destroy
will be called.
Note that this post-processor does not support Portlet initialization
parameters. Bean instances that implement the Portlet interface are
supposed to be configured like any other Spring bean, that is, through
constructor arguments or bean properties.
For reuse of a Portlet implementation in a plain Portlet container and as
a bean in a Spring context, consider deriving from Spring's GenericPortletBean
base class that applies Portlet initialization parameters as bean properties,
supporting both initialization styles.
Alternatively, consider wrapping a Portlet with Spring's
PortletWrappingController. This is particularly appropriate for
existing Portlet classes, allowing to specify Portlet initialization
parameters etc.
author: Juergen Hoeller author: John A. |
UserRoleAuthorizationInterceptor.java | Class | Interceptor that checks the authorization of the current user via the
user's roles, as evaluated by PortletRequest's isUserInRole method.
author: John A. |
WebRequestHandlerInterceptorAdapter.java | Class | Adapter that implements the Portlet HandlerInterceptor interface
and wraps an underlying WebRequestInterceptor. |