public class MockPortletResponse extends java.lang.Object implements PortletResponse
PortletResponse
interface.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) |
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)
addProperty
in interface PortletResponse
public void setProperty(java.lang.String key, java.lang.String value)
setProperty
in interface PortletResponse
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)
encodeURL
in interface PortletResponse
public void setNamespace(java.lang.String namespace)
public java.lang.String getNamespace()
getNamespace
in interface PortletResponse
public void addProperty(Cookie cookie)
addProperty
in interface PortletResponse
public Cookie[] getCookies()
public Cookie getCookie(java.lang.String name)
public void addProperty(java.lang.String key, org.w3c.dom.Element value)
addProperty
in interface PortletResponse
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
createElement
in interface PortletResponse
org.w3c.dom.DOMException