org.springframework.mock.web.portlet
Class MockPortletURL

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

public class MockPortletURL
extends java.lang.Object
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
           
 
Constructor Summary
MockPortletURL(javax.portlet.PortalContext portalContext, java.lang.String urlType)
          Create a new MockPortletURL for the given URL type.
 
Method Summary
 java.lang.String getParameter(java.lang.String name)
           
 java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
           
 java.util.Set<java.lang.String> getParameterNames()
           
 java.lang.String[] getParameterValues(java.lang.String name)
           
 boolean isSecure()
           
 void setParameter(java.lang.String key, java.lang.String value)
           
 void setParameter(java.lang.String key, java.lang.String[] values)
           
 void setParameters(java.util.Map parameters)
           
 void setPortletMode(javax.portlet.PortletMode portletMode)
           
 void setSecure(boolean secure)
           
 void setWindowState(javax.portlet.WindowState windowState)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

setPortletMode

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

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Specified by:
setParameter in interface javax.portlet.PortletURL

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String[] values)
Specified by:
setParameter in interface javax.portlet.PortletURL

setParameters

public void setParameters(java.util.Map parameters)
Specified by:
setParameters in interface javax.portlet.PortletURL

getParameterNames

public java.util.Set<java.lang.String> getParameterNames()

getParameter

public java.lang.String getParameter(java.lang.String name)

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)

getParameterMap

public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()

setSecure

public void setSecure(boolean secure)
               throws javax.portlet.PortletSecurityException
Specified by:
setSecure in interface javax.portlet.PortletURL
Throws:
javax.portlet.PortletSecurityException

isSecure

public boolean isSecure()

toString

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