1 16 19 20 package org.apache.pluto.portlet; 21 22 import java.util.Map ; 23 24 import javax.portlet.ActionResponse; 25 import javax.portlet.PortletMode; 26 import javax.portlet.PortletModeException; 27 import javax.portlet.WindowState; 28 import javax.portlet.WindowStateException; 29 30 public class ActionResponseWrapper extends PortletResponseWrapper 31 implements ActionResponse 32 { 33 34 38 public ActionResponseWrapper(ActionResponse actionResponse) 39 { 40 super(actionResponse); 41 42 if (actionResponse == null) 43 { 44 throw new IllegalArgumentException ("Response cannot be null"); 45 } 46 } 47 48 public void setWindowState(WindowState windowState) throws WindowStateException 50 { 51 this.getActionResponse().setWindowState(windowState); 52 } 53 54 public void setPortletMode(PortletMode portletMode) throws PortletModeException 55 { 56 this.getActionResponse().setPortletMode(portletMode); 57 } 58 59 public void sendRedirect(String location) throws java.io.IOException 60 { 61 this.getActionResponse().sendRedirect(location); 62 } 63 64 public void setRenderParameters(Map parameters) 65 { 66 this.getActionResponse().setRenderParameters(parameters); 67 } 68 69 public void setRenderParameter(String key, String value) 70 { 71 this.getActionResponse().setRenderParameter(key, value); 72 } 73 74 public void setRenderParameter(String key, String [] values) 75 { 76 this.getActionResponse().setRenderParameter(key, values); 77 } 78 79 81 85 public ActionResponse getActionResponse() 86 { 87 return (ActionResponse) getPortletResponse(); 88 } 89 90 } 92 93 | Popular Tags |