1 16 19 20 package org.apache.pluto.portalImpl.servlet; 21 22 import java.io.PrintWriter ; 23 24 import javax.servlet.http.HttpServletRequest ; 25 import javax.servlet.http.HttpServletResponse ; 26 27 import org.apache.pluto.om.window.PortletWindow; 28 import org.apache.pluto.portalImpl.services.factorymanager.FactoryManager; 29 30 public class ServletObjectAccess 31 { 32 33 public static HttpServletRequest getServletRequest(HttpServletRequest request, PortletWindow portletWindow) 34 { 35 return getRequestFactory().getServletRequest(request, portletWindow); 36 } 37 38 public static HttpServletResponse getServletResponse(HttpServletResponse response) 39 { 40 return getResponseFactory().getServletResponse(response); 41 } 42 43 public static HttpServletResponse getStoredServletResponse(HttpServletResponse response, PrintWriter writer) 44 { 45 return getResponseFactory().getStoredServletResponse(response, writer); 46 } 47 48 49 private static ServletRequestFactory getRequestFactory() 50 { 51 return (ServletRequestFactory)FactoryManager.getFactory(javax.servlet.http.HttpServletRequest .class); 52 } 53 private static ServletResponseFactory getResponseFactory() 54 { 55 return (ServletResponseFactory)FactoryManager.getFactory(javax.servlet.http.HttpServletResponse .class); 56 } 57 } 58 | Popular Tags |