Spring Framework

org.springframework.mock.web.portlet
Class MockPortletURL

java.lang.Object
  extended by org.springframework.mock.web.portlet.MockBaseURL
      extended by org.springframework.mock.web.portlet.MockPortletURL
All Implemented Interfaces:
javax.portlet.BaseURL, javax.portlet.PortletURL

public class MockPortletURL
extends MockBaseURL
implements javax.portlet.PortletURL

Mock implementation of the PortletURL interface.

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

Field Summary
static java.lang.String URL_TYPE_ACTION
           
static java.lang.String URL_TYPE_RENDER
           
 
Fields inherited from class org.springframework.mock.web.portlet.MockBaseURL
parameters
 
Constructor Summary
MockPortletURL(javax.portlet.PortalContext portalContext, java.lang.String urlType)
          Create a new MockPortletURL for the given URL type.
 
Method Summary
 javax.portlet.PortletMode getPortletMode()
           
 javax.portlet.WindowState getWindowState()
           
 void removePublicRenderParameter(java.lang.String name)
           
 void setPortletMode(javax.portlet.PortletMode portletMode)
           
 void setWindowState(javax.portlet.WindowState windowState)
           
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.mock.web.portlet.MockBaseURL
addProperty, encodeParameter, encodeParameter, getParameter, getParameterMap, getParameterNames, getParameterValues, getProperties, isSecure, setParameter, setParameter, setParameters, setProperty, setSecure, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.portlet.BaseURL
addProperty, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, write, write
 

Field Detail

URL_TYPE_RENDER

public static final java.lang.String URL_TYPE_RENDER
See Also:
Constant Field Values

URL_TYPE_ACTION

public static final java.lang.String URL_TYPE_ACTION
See Also:
Constant Field Values
Constructor Detail

MockPortletURL

public MockPortletURL(javax.portlet.PortalContext portalContext,
                      java.lang.String urlType)
Create a new MockPortletURL for the given URL type.

Parameters:
portalContext - the PortalContext defining the supported PortletModes and WindowStates
urlType - the URL type, for example "render" or "action"
See Also:
URL_TYPE_RENDER, URL_TYPE_ACTION
Method Detail

setWindowState

public void setWindowState(javax.portlet.WindowState windowState)
                    throws javax.portlet.WindowStateException
Specified by:
setWindowState in interface javax.portlet.PortletURL
Throws:
javax.portlet.WindowStateException

getWindowState

public javax.portlet.WindowState getWindowState()
Specified by:
getWindowState in interface javax.portlet.PortletURL

setPortletMode

public void setPortletMode(javax.portlet.PortletMode portletMode)
                    throws javax.portlet.PortletModeException
Specified by:
setPortletMode in interface javax.portlet.PortletURL
Throws:
javax.portlet.PortletModeException

getPortletMode

public javax.portlet.PortletMode getPortletMode()
Specified by:
getPortletMode in interface javax.portlet.PortletURL

removePublicRenderParameter

public void removePublicRenderParameter(java.lang.String name)
Specified by:
removePublicRenderParameter in interface javax.portlet.PortletURL

toString

public java.lang.String toString()
Specified by:
toString in interface javax.portlet.BaseURL
Overrides:
toString in class java.lang.Object

Spring Framework