1 16 17 package org.springframework.web.portlet.mvc; 18 19 import javax.portlet.ActionRequest; 20 import javax.portlet.ActionResponse; 21 import javax.portlet.RenderRequest; 22 import javax.portlet.RenderResponse; 23 24 import org.springframework.web.portlet.HandlerAdapter; 25 import org.springframework.web.portlet.ModelAndView; 26 27 37 public class SimpleControllerHandlerAdapter implements HandlerAdapter { 38 39 public boolean supports(Object handler) { 40 return (handler instanceof Controller); 41 } 42 43 public void handleAction(ActionRequest request, ActionResponse response, Object handler) 44 throws Exception { 45 46 ((Controller) handler).handleActionRequest(request, response); 47 } 48 49 public ModelAndView handleRender(RenderRequest request, RenderResponse response, Object handler) 50 throws Exception { 51 52 return ((Controller) handler).handleRenderRequest(request, response); 53 } 54 55 } 56 | Popular Tags |