Spring Framework

org.springframework.web.portlet.handler
Class HandlerInterceptorAdapter

java.lang.Object
  extended by org.springframework.web.portlet.handler.HandlerInterceptorAdapter
All Implemented Interfaces:
HandlerInterceptor
Direct Known Subclasses:
ParameterMappingInterceptor, UserRoleAuthorizationInterceptor

public abstract class HandlerInterceptorAdapter
extends java.lang.Object
implements HandlerInterceptor

Abstract adapter class for the HandlerInterceptor interface, for simplified implementation of pre-only/post-only interceptors.

Since:
2.0
Author:
Juergen Hoeller, John A. Lewis

Constructor Summary
HandlerInterceptorAdapter()
           
 
Method Summary
 void afterActionCompletion(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, java.lang.Object handler, java.lang.Exception ex)
          This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).
protected  void afterCompletion(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, java.lang.Object handler, java.lang.Exception ex)
          Default callback that all "after*" methods delegate to.
 void afterEventCompletion(javax.portlet.EventRequest request, javax.portlet.EventResponse response, java.lang.Object handler, java.lang.Exception ex)
          This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).
 void afterRenderCompletion(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, java.lang.Object handler, java.lang.Exception ex)
          This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).
 void afterResourceCompletion(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response, java.lang.Object handler, java.lang.Exception ex)
          This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).
 void postHandleRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, java.lang.Object handler, ModelAndView modelAndView)
          This implementation is empty.
 void postHandleResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response, java.lang.Object handler, ModelAndView modelAndView)
          This implementation is empty.
protected  boolean preHandle(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, java.lang.Object handler)
          Default callback that all "pre*" methods delegate to.
 boolean preHandleAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, java.lang.Object handler)
          This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).
 boolean preHandleEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response, java.lang.Object handler)
          This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).
 boolean preHandleRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, java.lang.Object handler)
          This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).
 boolean preHandleResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response, java.lang.Object handler)
          This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerInterceptorAdapter

public HandlerInterceptorAdapter()
Method Detail

preHandleAction

public boolean preHandleAction(javax.portlet.ActionRequest request,
                               javax.portlet.ActionResponse response,
                               java.lang.Object handler)
                        throws java.lang.Exception
This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).

Specified by:
preHandleAction in interface HandlerInterceptor
Parameters:
request - current portlet action request
response - current portlet action response
handler - chosen handler to execute, for type and/or instance evaluation
Returns:
true if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherPortlet assumes that this interceptor has already dealt with the response itself
Throws:
java.lang.Exception - in case of errors

afterActionCompletion

public void afterActionCompletion(javax.portlet.ActionRequest request,
                                  javax.portlet.ActionResponse response,
                                  java.lang.Object handler,
                                  java.lang.Exception ex)
                           throws java.lang.Exception
This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).

Specified by:
afterActionCompletion in interface HandlerInterceptor
Parameters:
request - current portlet action request
response - current portlet action response
handler - chosen handler to execute, for type and/or instance examination
ex - exception thrown on handler execution, if any (only included as additional context information for the case where a handler threw an exception; request execution may have failed even when this argument is null)
Throws:
java.lang.Exception - in case of errors

preHandleRender

public boolean preHandleRender(javax.portlet.RenderRequest request,
                               javax.portlet.RenderResponse response,
                               java.lang.Object handler)
                        throws java.lang.Exception
This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).

Specified by:
preHandleRender in interface HandlerInterceptor
Parameters:
request - current portlet render request
response - current portlet render response
handler - chosen handler to execute, for type and/or instance evaluation
Returns:
true if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherPortlet assumes that this interceptor has already dealt with the response itself
Throws:
java.lang.Exception - in case of errors

postHandleRender

public void postHandleRender(javax.portlet.RenderRequest request,
                             javax.portlet.RenderResponse response,
                             java.lang.Object handler,
                             ModelAndView modelAndView)
                      throws java.lang.Exception
This implementation is empty.

Specified by:
postHandleRender in interface HandlerInterceptor
Parameters:
request - current portlet render request
response - current portlet render response
handler - chosen handler to execute, for type and/or instance examination
modelAndView - the ModelAndView that the handler returned (can also be null)
Throws:
java.lang.Exception - in case of errors

afterRenderCompletion

public void afterRenderCompletion(javax.portlet.RenderRequest request,
                                  javax.portlet.RenderResponse response,
                                  java.lang.Object handler,
                                  java.lang.Exception ex)
                           throws java.lang.Exception
This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).

Specified by:
afterRenderCompletion in interface HandlerInterceptor
Parameters:
request - current portlet render request
response - current portlet render response
handler - chosen handler to execute, for type and/or instance examination
ex - exception thrown on handler execution, if any
Throws:
java.lang.Exception - in case of errors

preHandleResource

public boolean preHandleResource(javax.portlet.ResourceRequest request,
                                 javax.portlet.ResourceResponse response,
                                 java.lang.Object handler)
                          throws java.lang.Exception
This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).

Specified by:
preHandleResource in interface HandlerInterceptor
Parameters:
request - current portlet render request
response - current portlet render response
handler - chosen handler to execute, for type and/or instance evaluation
Returns:
true if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherPortlet assumes that this interceptor has already dealt with the response itself
Throws:
java.lang.Exception - in case of errors

postHandleResource

public void postHandleResource(javax.portlet.ResourceRequest request,
                               javax.portlet.ResourceResponse response,
                               java.lang.Object handler,
                               ModelAndView modelAndView)
                        throws java.lang.Exception
This implementation is empty.

Specified by:
postHandleResource in interface HandlerInterceptor
Parameters:
request - current portlet render request
response - current portlet render response
handler - chosen handler to execute, for type and/or instance examination
modelAndView - the ModelAndView that the handler returned (can also be null)
Throws:
java.lang.Exception - in case of errors

afterResourceCompletion

public void afterResourceCompletion(javax.portlet.ResourceRequest request,
                                    javax.portlet.ResourceResponse response,
                                    java.lang.Object handler,
                                    java.lang.Exception ex)
                             throws java.lang.Exception
This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).

Specified by:
afterResourceCompletion in interface HandlerInterceptor
Parameters:
request - current portlet render request
response - current portlet render response
handler - chosen handler to execute, for type and/or instance examination
ex - exception thrown on handler execution, if any
Throws:
java.lang.Exception - in case of errors

preHandleEvent

public boolean preHandleEvent(javax.portlet.EventRequest request,
                              javax.portlet.EventResponse response,
                              java.lang.Object handler)
                       throws java.lang.Exception
This implementation delegates to preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object).

Specified by:
preHandleEvent in interface HandlerInterceptor
Parameters:
request - current portlet action request
response - current portlet action response
handler - chosen handler to execute, for type and/or instance evaluation
Returns:
true if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherPortlet assumes that this interceptor has already dealt with the response itself
Throws:
java.lang.Exception - in case of errors

afterEventCompletion

public void afterEventCompletion(javax.portlet.EventRequest request,
                                 javax.portlet.EventResponse response,
                                 java.lang.Object handler,
                                 java.lang.Exception ex)
                          throws java.lang.Exception
This implementation delegates to afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception).

Specified by:
afterEventCompletion in interface HandlerInterceptor
Parameters:
request - current portlet action request
response - current portlet action response
handler - chosen handler to execute, for type and/or instance examination
ex - exception thrown on handler execution, if any (only included as additional context information for the case where a handler threw an exception; request execution may have failed even when this argument is null)
Throws:
java.lang.Exception - in case of errors

preHandle

protected boolean preHandle(javax.portlet.PortletRequest request,
                            javax.portlet.PortletResponse response,
                            java.lang.Object handler)
                     throws java.lang.Exception
Default callback that all "pre*" methods delegate to.

This implementation always returns true.

Throws:
java.lang.Exception

afterCompletion

protected void afterCompletion(javax.portlet.PortletRequest request,
                               javax.portlet.PortletResponse response,
                               java.lang.Object handler,
                               java.lang.Exception ex)
                        throws java.lang.Exception
Default callback that all "after*" methods delegate to.

This implementation is empty.

Throws:
java.lang.Exception

Spring Framework