public class MockPortletResponse
extends java.lang.Object
javax.portlet.PortletResponse
interface.Modifier and Type | Field and Description |
---|---|
private java.util.Set<Cookie> |
cookies |
private java.lang.String |
namespace |
private PortalContext |
portalContext |
private java.util.Map<java.lang.String,java.lang.String[]> |
properties |
private org.w3c.dom.Document |
xmlDocument |
private java.util.Map<java.lang.String,org.w3c.dom.Element[]> |
xmlProperties |
Constructor and Description |
---|
MockPortletResponse()
Create a new MockPortletResponse with a default
MockPortalContext . |
MockPortletResponse(PortalContext portalContext)
Create a new MockPortletResponse.
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(Cookie cookie) |
void |
addProperty(java.lang.String key,
org.w3c.dom.Element value) |
void |
addProperty(java.lang.String key,
java.lang.String value) |
org.w3c.dom.Element |
createElement(java.lang.String tagName) |
java.lang.String |
encodeURL(java.lang.String path) |
Cookie |
getCookie(java.lang.String name) |
Cookie[] |
getCookies() |
java.lang.String |
getNamespace() |
PortalContext |
getPortalContext()
Return the PortalContext that this MockPortletResponse runs in,
defining the supported PortletModes and WindowStates.
|
java.lang.String[] |
getProperties(java.lang.String key) |
java.lang.String |
getProperty(java.lang.String key) |
java.util.Set<java.lang.String> |
getPropertyNames() |
org.w3c.dom.Element[] |
getXmlProperties(java.lang.String key) |
org.w3c.dom.Element |
getXmlProperty(java.lang.String key) |
java.util.Set<java.lang.String> |
getXmlPropertyNames() |
void |
setNamespace(java.lang.String namespace) |
void |
setProperty(java.lang.String key,
java.lang.String value) |
private final PortalContext portalContext
private final java.util.Map<java.lang.String,java.lang.String[]> properties
private java.lang.String namespace
private final java.util.Set<Cookie> cookies
private final java.util.Map<java.lang.String,org.w3c.dom.Element[]> xmlProperties
private org.w3c.dom.Document xmlDocument
public MockPortletResponse()
MockPortalContext
.MockPortalContext
public MockPortletResponse(PortalContext portalContext)
portalContext
- the PortalContext defining the supported
PortletModes and WindowStatespublic PortalContext getPortalContext()
public void addProperty(java.lang.String key, java.lang.String value)
public void setProperty(java.lang.String key, java.lang.String value)
public java.util.Set<java.lang.String> getPropertyNames()
public java.lang.String getProperty(java.lang.String key)
public java.lang.String[] getProperties(java.lang.String key)
public java.lang.String encodeURL(java.lang.String path)
public void setNamespace(java.lang.String namespace)
public java.lang.String getNamespace()
public void addProperty(Cookie cookie)
public Cookie[] getCookies()
public Cookie getCookie(java.lang.String name)
public void addProperty(java.lang.String key, org.w3c.dom.Element value)
public java.util.Set<java.lang.String> getXmlPropertyNames()
public org.w3c.dom.Element getXmlProperty(java.lang.String key)
public org.w3c.dom.Element[] getXmlProperties(java.lang.String key)
public org.w3c.dom.Element createElement(java.lang.String tagName) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException