org.springframework.mock.web.portlet
Class MockActionResponse
java.lang.Object
org.springframework.mock.web.portlet.MockPortletResponse
org.springframework.mock.web.portlet.MockStateAwareResponse
org.springframework.mock.web.portlet.MockActionResponse
- All Implemented Interfaces:
- ActionResponse, PortletResponse, StateAwareResponse
public class MockActionResponse
- extends MockStateAwareResponse
- implements ActionResponse
Mock implementation of the ActionResponse
interface.
- Since:
- 2.0
- Author:
- John A. Lewis, Juergen Hoeller
Methods inherited from class org.springframework.mock.web.portlet.MockStateAwareResponse |
getEvent, getEvent, getEventNames, getPortletMode, getRenderParameter, getRenderParameterMap, getRenderParameterNames, getRenderParameterValues, getWindowState, removePublicRenderParameter, setEvent, setEvent |
Methods inherited from class org.springframework.mock.web.portlet.MockPortletResponse |
addProperty, addProperty, addProperty, createElement, encodeURL, getCookie, getCookies, getNamespace, getPortalContext, getProperties, getProperty, getPropertyNames, getXmlProperties, getXmlProperty, getXmlPropertyNames, setNamespace, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockActionResponse
public MockActionResponse()
- Create a new MockActionResponse with a default
MockPortalContext
.
- See Also:
MockPortalContext
MockActionResponse
public MockActionResponse(PortalContext portalContext)
- Create a new MockActionResponse.
- Parameters:
portalContext
- the PortalContext defining the supported
PortletModes and WindowStates
setWindowState
public void setWindowState(WindowState windowState)
throws WindowStateException
- Specified by:
setWindowState
in interface StateAwareResponse
- Overrides:
setWindowState
in class MockStateAwareResponse
- Throws:
WindowStateException
setPortletMode
public void setPortletMode(PortletMode portletMode)
throws PortletModeException
- Specified by:
setPortletMode
in interface StateAwareResponse
- Overrides:
setPortletMode
in class MockStateAwareResponse
- Throws:
PortletModeException
setRenderParameters
public void setRenderParameters(Map<String,String[]> parameters)
- Specified by:
setRenderParameters
in interface StateAwareResponse
- Overrides:
setRenderParameters
in class MockStateAwareResponse
setRenderParameter
public void setRenderParameter(String key,
String value)
- Specified by:
setRenderParameter
in interface StateAwareResponse
- Overrides:
setRenderParameter
in class MockStateAwareResponse
setRenderParameter
public void setRenderParameter(String key,
String[] values)
- Specified by:
setRenderParameter
in interface StateAwareResponse
- Overrides:
setRenderParameter
in class MockStateAwareResponse
sendRedirect
public void sendRedirect(String location)
throws IOException
- Specified by:
sendRedirect
in interface ActionResponse
- Throws:
IOException
sendRedirect
public void sendRedirect(String location,
String renderUrlParamName)
throws IOException
- Specified by:
sendRedirect
in interface ActionResponse
- Throws:
IOException
getRedirectedUrl
public String getRedirectedUrl()