public class MockPortletRequest extends Object implements javax.portlet.PortletRequest
Mock implementation of PortletRequest.
| Constructor and Description |
|---|
MockPortletRequest() |
MockPortletRequest(javax.portlet.PortletSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(String name,
String value)
Add a request parameter for this request.
|
Object |
getAttribute(String name) |
Enumeration |
getAttributeNames() |
String |
getAuthType() |
String |
getContextPath() |
Locale |
getLocale() |
Enumeration |
getLocales() |
String |
getParameter(String name) |
Map |
getParameterMap() |
Enumeration |
getParameterNames() |
String[] |
getParameterValues(String name) |
javax.portlet.PortalContext |
getPortalContext() |
javax.portlet.PortletMode |
getPortletMode() |
javax.portlet.PortletSession |
getPortletSession() |
javax.portlet.PortletSession |
getPortletSession(boolean create) |
javax.portlet.PortletPreferences |
getPreferences() |
Enumeration |
getProperties(String arg0) |
String |
getProperty(String arg0) |
Enumeration |
getPropertyNames() |
String |
getRemoteUser() |
String |
getRequestedSessionId() |
String |
getResponseContentType() |
Enumeration |
getResponseContentTypes() |
String |
getScheme() |
String |
getServerName() |
int |
getServerPort() |
Principal |
getUserPrincipal() |
javax.portlet.WindowState |
getWindowState() |
boolean |
isPortletModeAllowed(javax.portlet.PortletMode arg0) |
boolean |
isRequestedSessionIdValid() |
boolean |
isSecure() |
boolean |
isUserInRole(String arg0) |
boolean |
isWindowStateAllowed(javax.portlet.WindowState arg0) |
void |
removeAttribute(String name) |
void |
setAttribute(String name,
Object value) |
void |
setLocale(Locale locale)
Set the
Locale associated with this request. |
void |
setPortletSession(javax.portlet.PortletSession session)
Set the
PortletSession associated with this request. |
void |
setUserPrincipal(Principal principal)
Set the
Principal associated with this request. |
public MockPortletRequest()
public MockPortletRequest(javax.portlet.PortletSession session)
public void addParameter(String name, String value)
Add a request parameter for this request.
name - Parameter namevalue - Parameter valuepublic void setPortletSession(javax.portlet.PortletSession session)
Set the PortletSession associated with this request.
session - The new sessionpublic void setLocale(Locale locale)
Set the Locale associated with this request.
locale - The new localepublic void setUserPrincipal(Principal principal)
Set the Principal associated with this request.
principal - The new Principalpublic String getAuthType()
getAuthType in interface javax.portlet.PortletRequestpublic String getContextPath()
getContextPath in interface javax.portlet.PortletRequestpublic Object getAttribute(String name)
getAttribute in interface javax.portlet.PortletRequestpublic Enumeration getAttributeNames()
getAttributeNames in interface javax.portlet.PortletRequestpublic Locale getLocale()
getLocale in interface javax.portlet.PortletRequestpublic Enumeration getLocales()
getLocales in interface javax.portlet.PortletRequestpublic String getParameter(String name)
getParameter in interface javax.portlet.PortletRequestpublic Map getParameterMap()
getParameterMap in interface javax.portlet.PortletRequestpublic Enumeration getParameterNames()
getParameterNames in interface javax.portlet.PortletRequestpublic String[] getParameterValues(String name)
getParameterValues in interface javax.portlet.PortletRequestpublic javax.portlet.PortalContext getPortalContext()
getPortalContext in interface javax.portlet.PortletRequestpublic javax.portlet.PortletMode getPortletMode()
getPortletMode in interface javax.portlet.PortletRequestpublic javax.portlet.PortletSession getPortletSession()
getPortletSession in interface javax.portlet.PortletRequestpublic javax.portlet.PortletSession getPortletSession(boolean create)
getPortletSession in interface javax.portlet.PortletRequestpublic javax.portlet.PortletPreferences getPreferences()
getPreferences in interface javax.portlet.PortletRequestpublic Enumeration getProperties(String arg0)
getProperties in interface javax.portlet.PortletRequestpublic String getProperty(String arg0)
getProperty in interface javax.portlet.PortletRequestpublic Enumeration getPropertyNames()
getPropertyNames in interface javax.portlet.PortletRequestpublic String getRemoteUser()
getRemoteUser in interface javax.portlet.PortletRequestpublic String getRequestedSessionId()
getRequestedSessionId in interface javax.portlet.PortletRequestpublic String getResponseContentType()
getResponseContentType in interface javax.portlet.PortletRequestpublic Enumeration getResponseContentTypes()
getResponseContentTypes in interface javax.portlet.PortletRequestpublic String getScheme()
getScheme in interface javax.portlet.PortletRequestpublic String getServerName()
getServerName in interface javax.portlet.PortletRequestpublic int getServerPort()
getServerPort in interface javax.portlet.PortletRequestpublic Principal getUserPrincipal()
getUserPrincipal in interface javax.portlet.PortletRequestpublic javax.portlet.WindowState getWindowState()
getWindowState in interface javax.portlet.PortletRequestpublic boolean isPortletModeAllowed(javax.portlet.PortletMode arg0)
isPortletModeAllowed in interface javax.portlet.PortletRequestpublic boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface javax.portlet.PortletRequestpublic boolean isSecure()
isSecure in interface javax.portlet.PortletRequestpublic boolean isUserInRole(String arg0)
isUserInRole in interface javax.portlet.PortletRequestpublic boolean isWindowStateAllowed(javax.portlet.WindowState arg0)
isWindowStateAllowed in interface javax.portlet.PortletRequestpublic void removeAttribute(String name)
removeAttribute in interface javax.portlet.PortletRequestCopyright © 2017 The Apache Software Foundation. All rights reserved.