1 16 17 package org.springframework.web.portlet.handler; 18 19 import java.io.IOException ; 20 21 import javax.portlet.ActionRequest; 22 import javax.portlet.ActionResponse; 23 import javax.portlet.RenderRequest; 24 import javax.portlet.RenderResponse; 25 import javax.portlet.PortletRequest; 26 import javax.portlet.PortletResponse; 27 import javax.portlet.PortletException; 28 29 import org.springframework.web.portlet.HandlerInterceptor; 30 import org.springframework.web.portlet.ModelAndView; 31 32 40 public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { 41 42 46 public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) throws Exception { 47 return preHandle(request, response, handler); 48 } 49 50 54 public void afterActionCompletion( 55 ActionRequest request, ActionResponse response, Object handler, Exception ex) throws Exception { 56 57 afterCompletion(request, response, handler, ex); 58 } 59 60 61 65 public boolean preHandleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception { 66 return preHandle(request, response, handler); 67 } 68 69 72 public void postHandleRender( 73 RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView) throws Exception { 74 } 75 76 80 public void afterRenderCompletion( 81 RenderRequest request, RenderResponse response, Object handler, Exception ex) throws Exception { 82 83 afterCompletion(request, response, handler, ex); 84 } 85 86 87 94 protected boolean preHandle(PortletRequest request, PortletResponse response, Object handler) 95 throws Exception { 96 97 return true; 98 } 99 100 107 protected void afterCompletion( 108 PortletRequest request, PortletResponse response, Object handler, Exception ex) throws Exception { 109 110 } 111 112 } 113 | Popular Tags |