public class MockPortletRequest extends Object implements PortletRequest
PortletRequest interface.PortletRequest.P3PUserInfosACTION_PHASE, ACTION_SCOPE_ID, BASIC_AUTH, CCPP_PROFILE, CLIENT_CERT_AUTH, DIGEST_AUTH, EVENT_PHASE, FORM_AUTH, LIFECYCLE_PHASE, RENDER_HEADERS, RENDER_MARKUP, RENDER_PART, RENDER_PHASE, RESOURCE_PHASE, USER_INFO| Constructor and Description |
|---|
MockPortletRequest()
Create a new MockPortletRequest with a default
MockPortalContext
and a default MockPortletContext. |
MockPortletRequest(PortalContext portalContext,
PortletContext portletContext)
Create a new MockPortletRequest.
|
MockPortletRequest(PortletContext portletContext)
Create a new MockPortletRequest with a default
MockPortalContext. |
public MockPortletRequest()
MockPortalContext
and a default MockPortletContext.MockPortalContext,
MockPortletContextpublic MockPortletRequest(PortletContext portletContext)
MockPortalContext.portletContext - the PortletContext that the request runs inMockPortalContextpublic MockPortletRequest(PortalContext portalContext, PortletContext portletContext)
portalContext - the PortalContext that the request runs inportletContext - the PortletContext that the request runs inprotected String getLifecyclePhase()
public boolean isActive()
public void close()
protected void checkActive()
throws IllegalStateException
IllegalStateExceptionpublic boolean isWindowStateAllowed(WindowState windowState)
isWindowStateAllowed in interface PortletRequestpublic boolean isPortletModeAllowed(PortletMode portletMode)
isPortletModeAllowed in interface PortletRequestpublic void setPortletMode(PortletMode portletMode)
public PortletMode getPortletMode()
getPortletMode in interface PortletRequestpublic void setWindowState(WindowState windowState)
public WindowState getWindowState()
getWindowState in interface PortletRequestpublic void setPreferences(PortletPreferences preferences)
public PortletPreferences getPreferences()
getPreferences in interface PortletRequestpublic void setSession(PortletSession session)
public PortletSession getPortletSession()
getPortletSession in interface PortletRequestpublic PortletSession getPortletSession(boolean create)
getPortletSession in interface PortletRequestpublic void setProperty(String key, String value)
If there are already one or more values registered for the given property key, they will be replaced.
public void addProperty(String key, String value)
If there are already one or more values registered for the given property key, the given value will be added to the end of the list.
public String getProperty(String key)
getProperty in interface PortletRequestpublic Enumeration<String> getProperties(String key)
getProperties in interface PortletRequestpublic Enumeration<String> getPropertyNames()
getPropertyNames in interface PortletRequestpublic PortalContext getPortalContext()
getPortalContext in interface PortletRequestpublic void setAuthType(String authType)
public String getAuthType()
getAuthType in interface PortletRequestpublic void setContextPath(String contextPath)
public String getContextPath()
getContextPath in interface PortletRequestpublic void setRemoteUser(String remoteUser)
public String getRemoteUser()
getRemoteUser in interface PortletRequestpublic void setUserPrincipal(Principal userPrincipal)
public Principal getUserPrincipal()
getUserPrincipal in interface PortletRequestpublic void addUserRole(String role)
public boolean isUserInRole(String role)
isUserInRole in interface PortletRequestpublic Object getAttribute(String name)
getAttribute in interface PortletRequestpublic Enumeration<String> getAttributeNames()
getAttributeNames in interface PortletRequestpublic String getParameter(String name)
getParameter in interface PortletRequestpublic Enumeration<String> getParameterNames()
getParameterNames in interface PortletRequestpublic String[] getParameterValues(String name)
getParameterValues in interface PortletRequestpublic Map<String,String[]> getParameterMap()
getParameterMap in interface PortletRequestpublic void setSecure(boolean secure)
public boolean isSecure()
isSecure in interface PortletRequestpublic void setAttribute(String name, Object value)
setAttribute in interface PortletRequestpublic void removeAttribute(String name)
removeAttribute in interface PortletRequestpublic String getRequestedSessionId()
getRequestedSessionId in interface PortletRequestpublic void setRequestedSessionIdValid(boolean requestedSessionIdValid)
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface PortletRequestpublic void addResponseContentType(String responseContentType)
public void addPreferredResponseContentType(String responseContentType)
public String getResponseContentType()
getResponseContentType in interface PortletRequestpublic Enumeration<String> getResponseContentTypes()
getResponseContentTypes in interface PortletRequestpublic void addLocale(Locale locale)
public void addPreferredLocale(Locale locale)
public Locale getLocale()
getLocale in interface PortletRequestpublic Enumeration<Locale> getLocales()
getLocales in interface PortletRequestpublic void setScheme(String scheme)
public String getScheme()
getScheme in interface PortletRequestpublic void setServerName(String serverName)
public String getServerName()
getServerName in interface PortletRequestpublic void setServerPort(int serverPort)
public int getServerPort()
getServerPort in interface PortletRequestpublic void setWindowID(String windowID)
public String getWindowID()
getWindowID in interface PortletRequestpublic void setCookies(Cookie... cookies)
public Cookie[] getCookies()
getCookies in interface PortletRequestpublic Map<String,String[]> getPrivateParameterMap()
getPrivateParameterMap in interface PortletRequestpublic Map<String,String[]> getPublicParameterMap()
getPublicParameterMap in interface PortletRequestpublic void registerPublicParameter(String name)