Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.mock.web.portlet
Class MockPortletResponse

    java.lang.Object
      org.springframework.mock.web.portlet.MockPortletResponse

All Implemented Interfaces:
  javax.portlet.PortletResponse

Direct Known Subclasses:
  MockMimeResponse, MockStateAwareResponse

    public class MockPortletResponse

extends Object
implements javax.portlet.PortletResponse

Mock implementation of the `PortletResponse` interface.

Since:
  2.0
Author:
  John A. Lewis, Juergen Hoeller

Constructor Summary
`MockPortletResponse()` Create a new MockPortletResponse with a default `MockPortalContext`.
`MockPortletResponse(javax.portlet.PortalContext portalContext)` Create a new MockPortletResponse.

Method Summary
`void` | `addProperty(Cookie cookie)`
`void` | `addProperty(String key, Element value)`
`void` | `addProperty(String key, String value)`
`Element` | `createElement(String tagName)`
`String` | `encodeURL(String path)`
`Cookie` | `getCookie(String name)`
`Cookie[]` | `getCookies()`
`String` | `getNamespace()`
`javax.portlet.PortalContext` | `getPortalContext()` Return the PortalContext that this MockPortletResponse runs in, defining the supported PortletModes and WindowStates.
`String[]` | `getProperties(String key)`
`String` | `getProperty(String key)`
`Set<String>` | `getPropertyNames()`
`Element[]` | `getXmlProperties(String key)`
`Element` | `getXmlProperty(String key)`
`Set<String>` | `getXmlPropertyNames()`
`void` | `setNamespace(String namespace)`
`void` | `setProperty(String key, String value)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MockPortletResponse

    public MockPortletResponse()

  Create a new MockPortletResponse with a default `MockPortalContext`.

  See Also:
    `MockPortalContext`

### MockPortletResponse

    public MockPortletResponse(javax.portlet.PortalContext portalContext)

  Create a new MockPortletResponse.

  Parameters:
    `portalContext` - the PortalContext defining the supported PortletModes and WindowStates

Method Detail

### getPortalContext

    public javax.portlet.PortalContext getPortalContext()

  Return the PortalContext that this MockPortletResponse runs in, defining the supported PortletModes and WindowStates.

### addProperty

    public void addProperty(String key,
                            String value)

  Specified by:
    `addProperty` in interface `javax.portlet.PortletResponse`

### setProperty

    public void setProperty(String key,
                            String value)

  Specified by:
    `setProperty` in interface `javax.portlet.PortletResponse`

### getPropertyNames

    public Set<String> getPropertyNames()

### getProperty

    public String getProperty(String key)

### getProperties

    public String[] getProperties(String key)

### encodeURL

    public String encodeURL(String path)

  Specified by:
    `encodeURL` in interface `javax.portlet.PortletResponse`

### setNamespace

    public void setNamespace(String namespace)

### getNamespace

    public String getNamespace()

  Specified by:
    `getNamespace` in interface `javax.portlet.PortletResponse`

### addProperty

    public void addProperty(Cookie cookie)

  Specified by:
    `addProperty` in interface `javax.portlet.PortletResponse`

### getCookies

    public Cookie[] getCookies()

### getCookie

    public Cookie getCookie(String name)

### addProperty

    public void addProperty(String key,
                            Element value)

  Specified by:
    `addProperty` in interface `javax.portlet.PortletResponse`

### getXmlPropertyNames

    public Set<String> getXmlPropertyNames()

### getXmlProperty

    public Element getXmlProperty(String key)

### getXmlProperties

    public Element[] getXmlProperties(String key)

### createElement

    public Element createElement(String tagName)
                          throws DOMException

  Specified by:
    `createElement` in interface `javax.portlet.PortletResponse`
  Throws:
    `DOMException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD