1 5 6 13 package org.exoplatform.services.portletcontainer.impl.portletAPIImp; 14 15 16 import java.util.List ; 17 18 import javax.portlet.PortletResponse; 19 import javax.servlet.http.HttpServletResponse ; 20 import javax.servlet.http.HttpServletResponseWrapper ; 21 import org.exoplatform.services.portletcontainer.pci.Output; 22 23 24 public class PortletResponseImp extends HttpServletResponseWrapper 25 implements PortletResponse { 26 27 protected List customWindowStates; 28 private Output output; 29 30 public PortletResponseImp(HttpServletResponse httpServletResponse) { 31 super(httpServletResponse); 32 } 33 34 public void fillPortletResponse(HttpServletResponse response, 35 Output output, 36 List customWindowStates) { 37 super.setResponse(response); 38 this.output = output; 39 this.customWindowStates = customWindowStates; 40 } 41 42 public void emptyPortletResponse() { 43 } 44 45 public Output getOutput() { 46 return output; 47 } 48 49 public void addProperty(String s, String s1) { 50 output.addProperty(s, s1); 51 } 52 53 public void setProperty(String s, String s1) { 54 output.addProperty(s, s1); 55 } 56 57 public String encodeURL(String path) { 58 if (!path.startsWith("/") && !path.startsWith("http://")) { 59 throw new IllegalArgumentException ("Path must be started with / or http://") ; 60 } 61 return path; 62 } 63 64 } 65 | Popular Tags |