public class PortletResponseWrapper extends Object implements PortletResponse
PortletResponseWrapper provides a convenient
implementation of the PortletResponse interface
and is extended by other response wrappers.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped response object.PortletResponse| Constructor and Description |
|---|
PortletResponseWrapper(PortletResponse response)
Creates an
ActionResponse adaptor
wrapping the given response object. |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(javax.servlet.http.Cookie cookie)
The default behavior of this method is to call
addProperty() on the wrapped response object. |
void |
addProperty(String key,
Element element)
The default behavior of this method is to call
addProperty() on the wrapped response object. |
void |
addProperty(String key,
String value)
The default behavior of this method is to call
addProperty(key, value) on the wrapped response object. |
Element |
createElement(String tagName)
The default behavior of this method is to call
createElement() on the wrapped response object. |
String |
encodeURL(String path)
The default behavior of this method is to call
encodeURL(path) on the wrapped response object. |
String |
getNamespace()
The default behavior of this method is to call
getNamespace() on the wrapped response object. |
PortletResponse |
getResponse()
Return the wrapped response object.
|
void |
setProperty(String key,
String value)
The default behavior of this method is to call
setProperty(key, value) on the wrapped response object. |
void |
setResponse(PortletResponse response)
Sets the response object being wrapped.
|
public PortletResponseWrapper(PortletResponse response)
ActionResponse adaptor
wrapping the given response object.response - the action response to wrapIllegalArgumentException - if the response is nullpublic void addProperty(String key, String value)
addProperty(key, value) on the wrapped response object.addProperty in interface PortletResponsekey - the key of the property to be returned to the portalvalue - the value of the property to be returned to the portalpublic String encodeURL(String path)
encodeURL(path) on the wrapped response object.encodeURL in interface PortletResponsepath - the URI path to the resource. This must be either an absolute
URL (e.g.
http://my.co/myportal/mywebap/myfolder/myresource.gif)
or a full path URI (e.g.
/myportal/mywebap/myfolder/myresource.gif).public String getNamespace()
getNamespace() on the wrapped response object.getNamespace in interface PortletResponsepublic void setProperty(String key, String value)
setProperty(key, value) on the wrapped response object.setProperty in interface PortletResponsekey - the key of the property to be returned to the portalvalue - the value of the property to be returned to the portalpublic PortletResponse getResponse()
public void setResponse(PortletResponse response)
response - the response to setIllegalArgumentException - if the response is null.public void addProperty(String key, Element element)
addProperty() on the wrapped response object.addProperty in interface PortletResponsekey - the key of the property to be returned to the portalelement - the XML DOM element to be added to the responsepublic Element createElement(String tagName)
createElement() on the wrapped response object.createElement in interface PortletResponsetagName - name of the element type to instantiatepublic void addProperty(javax.servlet.http.Cookie cookie)
addProperty() on the wrapped response object.addProperty in interface PortletResponsecookie - the cookie to be added to the responseCopyright © 2004–2015 The Apache Software Foundation. All rights reserved.