1 16 19 20 package org.apache.pluto.portlet; 21 22 import javax.portlet.PortletResponse; 23 24 public class PortletResponseWrapper extends javax.servlet.http.HttpServletResponseWrapper 25 implements PortletResponse 26 { 27 28 32 public PortletResponseWrapper(PortletResponse portletResponse) 33 { 34 super((javax.servlet.http.HttpServletResponse )portletResponse); 35 36 if (portletResponse == null) 37 { 38 throw new IllegalArgumentException ("Response cannot be null"); 39 } 40 } 41 42 public void addProperty(String key, String value) 44 { 45 this.getPortletResponse().addProperty(key, value); 46 } 47 48 public void setProperty(String key, String value) 49 { 50 this.getPortletResponse().setProperty(key, value); 51 } 52 53 public String encodeURL(String path) 54 { 55 return this.getPortletResponse().encodeURL(path); 56 } 57 59 63 public PortletResponse getPortletResponse() 64 { 65 return (PortletResponse) super.getResponse(); 66 } 67 68 72 public void setResponse(PortletResponse response) 73 { 74 if (response == null) 75 { 76 throw new IllegalArgumentException ("Response cannot be null"); 77 } 78 setResponse((javax.servlet.http.HttpServletResponse )response); 79 } 80 } 82 83 | Popular Tags |