01: /*
02: * Copyright 2002 Sun Microsystems, Inc. All
03: * rights reserved. Use of this product is subject
04: * to license terms. Federal Acquisitions:
05: * Commercial Software -- Government Users
06: * Subject to Standard License Terms and
07: * Conditions.
08: *
09: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
10: * are trademarks or registered trademarks of Sun Microsystems,
11: * Inc. in the United States and other countries.
12: */
13:
14: package com.sun.portal.struts.wrapper;
15:
16: import javax.servlet.ServletException;
17:
18: import javax.portlet.PortletRequest;
19: import javax.portlet.ActionResponse;
20: import javax.portlet.RenderResponse;
21: import javax.portlet.PortletContext;
22: import javax.portlet.PortletConfig;
23:
24: import javax.servlet.ServletContext;
25: import javax.servlet.ServletConfig;
26: import javax.servlet.http.HttpServletRequest;
27: import javax.servlet.http.HttpServletResponse;
28:
29: import org.apache.struts.wrapper.ServletObjectsFactory;
30:
31: public class PSServletObjectsFactory implements ServletObjectsFactory {
32:
33: public ServletContext getServletContext(PortletContext pContext) {
34: return new PSServletContext(pContext);
35: }
36:
37: public ServletConfig getServletConfig(PortletConfig pConfig,
38: ServletContext sContext) {
39: return new PSServletConfig(pConfig, sContext);
40: }
41:
42: public HttpServletRequest getServletRequest(PortletRequest pRequest) {
43: return new PSServletRequest(pRequest);
44: }
45:
46: public HttpServletResponse getServletResponse(
47: PortletRequest pRequest, ActionResponse aResponse) {
48: return new PSServletResponse(pRequest, aResponse);
49: }
50:
51: public HttpServletResponse getServletResponse(
52: PortletRequest pRequest, RenderResponse rResponse) {
53: return new PSServletResponse(pRequest, rResponse);
54: }
55: }
|