org.springframework.mock.web.portlet
Class MockPortalContext
java.lang.Object
org.springframework.mock.web.portlet.MockPortalContext
public class MockPortalContext
- extends java.lang.Object
Mock implementation of the javax.portlet.PortalContext
interface.
- Since:
- 2.0
- Author:
- John A. Lewis, Juergen Hoeller
Field Summary |
private java.util.List<PortletMode> |
portletModes
|
private java.util.Map<java.lang.String,java.lang.String> |
properties
|
private java.util.List<WindowState> |
windowStates
|
Constructor Summary |
MockPortalContext()
Create a new MockPortalContext
with default PortletModes (VIEW, EDIT, HELP)
and default WindowStates (NORMAL, MAXIMIZED, MINIMIZED). |
MockPortalContext(java.util.List<PortletMode> supportedPortletModes,
java.util.List<WindowState> supportedWindowStates)
Create a new MockPortalContext with the given PortletModes and WindowStates. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
properties
private final java.util.Map<java.lang.String,java.lang.String> properties
portletModes
private final java.util.List<PortletMode> portletModes
windowStates
private final java.util.List<WindowState> windowStates
MockPortalContext
public MockPortalContext()
- Create a new MockPortalContext
with default PortletModes (VIEW, EDIT, HELP)
and default WindowStates (NORMAL, MAXIMIZED, MINIMIZED).
- See Also:
javax.portlet.PortletMode
,
javax.portlet.WindowState
MockPortalContext
public MockPortalContext(java.util.List<PortletMode> supportedPortletModes,
java.util.List<WindowState> supportedWindowStates)
- Create a new MockPortalContext with the given PortletModes and WindowStates.
- Parameters:
supportedPortletModes
- the List of supported PortletMode instancessupportedWindowStates
- the List of supported WindowState instances- See Also:
javax.portlet.PortletMode
,
javax.portlet.WindowState
getPortalInfo
public java.lang.String getPortalInfo()
setProperty
public void setProperty(java.lang.String name,
java.lang.String value)
getProperty
public java.lang.String getProperty(java.lang.String name)
getPropertyNames
public java.util.Enumeration<java.lang.String> getPropertyNames()
getSupportedPortletModes
public java.util.Enumeration<PortletMode> getSupportedPortletModes()
getSupportedWindowStates
public java.util.Enumeration<WindowState> getSupportedWindowStates()