Class MockPortletRequest
Object
com.liferay.portal.kernel.test.portlet.MockPortletRequest
- All Implemented Interfaces:
PortletRequest,RenderState
- Direct Known Subclasses:
MockClientDataRequest,MockRenderRequest
- Author:
- Dante Wang
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.portlet.PortletRequest
PortletRequest.P3PUserInfos -
Field Summary
Fields inherited from interface javax.portlet.PortletRequest
ACTION_PHASE, ACTION_SCOPE_ID, BASIC_AUTH, CCPP_PROFILE, CLIENT_CERT_AUTH, DIGEST_AUTH, EVENT_PHASE, FORM_AUTH, HEADER_PHASE, LIFECYCLE_PHASE, RENDER_HEADERS, RENDER_MARKUP, RENDER_PART, RENDER_PHASE, RESOURCE_PHASE, USER_INFO -
Constructor Summary
ConstructorsConstructorDescriptionMockPortletRequest(PortalContext portalContext, PortletContext portletContext) MockPortletRequest(PortletContext portletContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddParameter(String name, String value) voidaddParameter(String name, String[] values) voidaddPreferredLocale(Locale locale) voidaddPreferredResponseContentType(String responseContentType) voidaddProperty(String key, String value) voidaddResponseContentType(String responseContentType) voidaddUserRole(String role) protected voidvoidclose()getAttribute(String name) javax.servlet.http.Cookie[]protected StringgetParameter(String name) String[]getParameterValues(String name) getPortletSession(boolean create) getProperties(String key) getProperty(String key) intbooleanisActive()booleanisPortletModeAllowed(PortletMode portletMode) booleanbooleanisSecure()booleanisUserInRole(String role) booleanisWindowStateAllowed(WindowState windowState) voidvoidremoveAttribute(String name) voidsetAttribute(String name, Object value) voidsetAuthType(String authType) voidsetContextPath(String contextPath) voidsetCookies(javax.servlet.http.Cookie... cookies) voidsetParameter(String key, String value) voidsetParameter(String key, String[] values) voidsetParameters(Map<String, String[]> parameters) voidsetPortletMode(PortletMode portletMode) voidsetPortletSession(PortletSession portletSession) voidsetPreferences(PortletPreferences portletPreferences) voidsetProperty(String key, String value) voidsetRemoteUser(String remoteUser) voidsetRequestedSessionIdValid(boolean requestedSessionIdValid) voidvoidsetSecure(boolean secure) voidsetServerName(String serverName) voidsetServerPort(int serverPort) voidsetUserPrincipal(Principal userPrincipal) voidsetWindowID(String windowID) voidsetWindowState(WindowState windowState)
-
Constructor Details
-
MockPortletRequest
public MockPortletRequest() -
MockPortletRequest
-
MockPortletRequest
-
-
Method Details
-
addLocale
-
addParameter
-
addParameter
-
addPreferredLocale
-
addPreferredResponseContentType
-
addProperty
-
addResponseContentType
-
addUserRole
-
close
public void close() -
getAttribute
- Specified by:
getAttributein interfacePortletRequest
-
getAttributeNames
- Specified by:
getAttributeNamesin interfacePortletRequest
-
getAuthType
- Specified by:
getAuthTypein interfacePortletRequest
-
getContextPath
- Specified by:
getContextPathin interfacePortletRequest
-
getCookies
public javax.servlet.http.Cookie[] getCookies()- Specified by:
getCookiesin interfacePortletRequest
-
getLocale
- Specified by:
getLocalein interfacePortletRequest
-
getLocales
- Specified by:
getLocalesin interfacePortletRequest
-
getParameter
- Specified by:
getParameterin interfacePortletRequest
-
getParameterMap
- Specified by:
getParameterMapin interfacePortletRequest
-
getParameterNames
- Specified by:
getParameterNamesin interfacePortletRequest
-
getParameterValues
- Specified by:
getParameterValuesin interfacePortletRequest
-
getPortalContext
- Specified by:
getPortalContextin interfacePortletRequest
-
getPortletContext
- Specified by:
getPortletContextin interfacePortletRequest
-
getPortletMode
- Specified by:
getPortletModein interfaceRenderState
-
getPortletSession
- Specified by:
getPortletSessionin interfacePortletRequest
-
getPortletSession
- Specified by:
getPortletSessionin interfacePortletRequest
-
getPreferences
- Specified by:
getPreferencesin interfacePortletRequest
-
getPrivateParameterMap
- Specified by:
getPrivateParameterMapin interfacePortletRequest
-
getProperties
- Specified by:
getPropertiesin interfacePortletRequest
-
getProperty
- Specified by:
getPropertyin interfacePortletRequest
-
getPropertyNames
- Specified by:
getPropertyNamesin interfacePortletRequest
-
getPublicParameterMap
- Specified by:
getPublicParameterMapin interfacePortletRequest
-
getRemoteUser
- Specified by:
getRemoteUserin interfacePortletRequest
-
getRenderParameters
- Specified by:
getRenderParametersin interfaceRenderState
-
getRequestedSessionId
- Specified by:
getRequestedSessionIdin interfacePortletRequest
-
getResponseContentType
- Specified by:
getResponseContentTypein interfacePortletRequest
-
getResponseContentTypes
- Specified by:
getResponseContentTypesin interfacePortletRequest
-
getScheme
- Specified by:
getSchemein interfacePortletRequest
-
getServerName
- Specified by:
getServerNamein interfacePortletRequest
-
getServerPort
public int getServerPort()- Specified by:
getServerPortin interfacePortletRequest
-
getUserAgent
- Specified by:
getUserAgentin interfacePortletRequest
-
getUserPrincipal
- Specified by:
getUserPrincipalin interfacePortletRequest
-
getWindowID
- Specified by:
getWindowIDin interfacePortletRequest
-
getWindowState
- Specified by:
getWindowStatein interfaceRenderState
-
isActive
public boolean isActive() -
isPortletModeAllowed
- Specified by:
isPortletModeAllowedin interfacePortletRequest
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()- Specified by:
isRequestedSessionIdValidin interfacePortletRequest
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfacePortletRequest
-
isUserInRole
- Specified by:
isUserInRolein interfacePortletRequest
-
isWindowStateAllowed
- Specified by:
isWindowStateAllowedin interfacePortletRequest
-
registerPublicParameter
-
removeAttribute
- Specified by:
removeAttributein interfacePortletRequest
-
setAttribute
- Specified by:
setAttributein interfacePortletRequest
-
setAuthType
-
setContextPath
-
setCookies
public void setCookies(javax.servlet.http.Cookie... cookies) -
setParameter
-
setParameter
-
setParameters
-
setPortletMode
-
setPortletSession
-
setPreferences
-
setProperty
-
setRemoteUser
-
setRequestedSessionIdValid
public void setRequestedSessionIdValid(boolean requestedSessionIdValid) -
setScheme
-
setSecure
public void setSecure(boolean secure) -
setServerName
-
setServerPort
public void setServerPort(int serverPort) -
setUserPrincipal
-
setWindowID
-
setWindowState
-
checkActive
- Throws:
IllegalStateException
-
getLifecyclePhase
-