Class MockPortalContext
- java.lang.Object
- org.springframework.mock.web.portlet.MockPortalContext
- All Implemented Interfaces:
PortalContext
public class MockPortalContext extends Object implements PortalContext
Mock implementation of thePortalContext
interface.- Since:
- 2.0
- Author:
- John A. Lewis, Juergen Hoeller
Field Summary
Fields inherited from interface javax.portlet.PortalContext
MARKUP_HEAD_ELEMENT_SUPPORT
Constructor Summary
Constructors Constructor Description MockPortalContext()
Create a new MockPortalContext with default PortletModes (VIEW, EDIT, HELP) and default WindowStates (NORMAL, MAXIMIZED, MINIMIZED).MockPortalContext(List<PortletMode> supportedPortletModes, List<WindowState> supportedWindowStates)
Create a new MockPortalContext with the given PortletModes and WindowStates.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPortalInfo()
String
getProperty(String name)
Enumeration<String>
getPropertyNames()
Enumeration<PortletMode>
getSupportedPortletModes()
Enumeration<WindowState>
getSupportedWindowStates()
void
setProperty(String name, String value)
Constructor Detail
MockPortalContext
public MockPortalContext()
Create a new MockPortalContext with default PortletModes (VIEW, EDIT, HELP) and default WindowStates (NORMAL, MAXIMIZED, MINIMIZED).- See Also:
PortletMode
,WindowState
MockPortalContext
public MockPortalContext(List<PortletMode> supportedPortletModes, 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:
PortletMode
,WindowState
Method Detail
getPortalInfo
public String getPortalInfo()
- Specified by:
getPortalInfo
in interfacePortalContext
setProperty
public void setProperty(String name, String value)
getProperty
public String getProperty(String name)
- Specified by:
getProperty
in interfacePortalContext
getPropertyNames
public Enumeration<String> getPropertyNames()
- Specified by:
getPropertyNames
in interfacePortalContext
getSupportedPortletModes
public Enumeration<PortletMode> getSupportedPortletModes()
- Specified by:
getSupportedPortletModes
in interfacePortalContext
getSupportedWindowStates
public Enumeration<WindowState> getSupportedWindowStates()
- Specified by:
getSupportedWindowStates
in interfacePortalContext