Spring Framework

org.springframework.mock.web.portlet
Class MockPortalContext

java.lang.Object
  extended by org.springframework.mock.web.portlet.MockPortalContext
All Implemented Interfaces:
javax.portlet.PortalContext

public class MockPortalContext
extends java.lang.Object
implements javax.portlet.PortalContext

Mock implementation of the PortalContext 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
MockPortalContext()
          Create a new MockPortalContext with default PortletModes (VIEW, EDIT, HELP) and default WindowStates (NORMAL, MAXIMIZED, MINIMIZED).
MockPortalContext(java.util.List<javax.portlet.PortletMode> supportedPortletModes, java.util.List<javax.portlet.WindowState> supportedWindowStates)
          Create a new MockPortalContext with the given PortletModes and WindowStates.
 
Method Summary
 java.lang.String getPortalInfo()
           
 java.lang.String getProperty(java.lang.String name)
           
 java.util.Enumeration<java.lang.String> getPropertyNames()
           
 java.util.Enumeration<javax.portlet.PortletMode> getSupportedPortletModes()
           
 java.util.Enumeration<javax.portlet.WindowState> getSupportedWindowStates()
           
 void setProperty(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.util.List<javax.portlet.PortletMode> supportedPortletModes,
                         java.util.List<javax.portlet.WindowState> supportedWindowStates)
Create a new MockPortalContext with the given PortletModes and WindowStates.

Parameters:
supportedPortletModes - the List of supported PortletMode instances
supportedWindowStates - the List of supported WindowState instances
See Also:
PortletMode, WindowState
Method Detail

getPortalInfo

public java.lang.String getPortalInfo()
Specified by:
getPortalInfo in interface javax.portlet.PortalContext

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)

getProperty

public java.lang.String getProperty(java.lang.String name)
Specified by:
getProperty in interface javax.portlet.PortalContext

getPropertyNames

public java.util.Enumeration<java.lang.String> getPropertyNames()
Specified by:
getPropertyNames in interface javax.portlet.PortalContext

getSupportedPortletModes

public java.util.Enumeration<javax.portlet.PortletMode> getSupportedPortletModes()
Specified by:
getSupportedPortletModes in interface javax.portlet.PortalContext

getSupportedWindowStates

public java.util.Enumeration<javax.portlet.WindowState> getSupportedWindowStates()
Specified by:
getSupportedWindowStates in interface javax.portlet.PortalContext

Spring Framework