Class MockPortletRequest

Object
com.liferay.portal.kernel.test.portlet.MockPortletRequest
All Implemented Interfaces:
jakarta.portlet.PortletRequest, jakarta.portlet.RenderState
Direct Known Subclasses:
MockClientDataRequest, MockRenderRequest

public class MockPortletRequest extends Object implements jakarta.portlet.PortletRequest
Author:
Dante Wang
  • Constructor Details

    • MockPortletRequest

      public MockPortletRequest()
    • MockPortletRequest

      public MockPortletRequest(jakarta.portlet.PortalContext portalContext, jakarta.portlet.PortletContext portletContext)
    • MockPortletRequest

      public MockPortletRequest(jakarta.portlet.PortletContext portletContext)
  • Method Details

    • addLocale

      public void addLocale(Locale locale)
    • addParameter

      public void addParameter(String name, String value)
    • addParameter

      public void addParameter(String name, String[] values)
    • addPreferredLocale

      public void addPreferredLocale(Locale locale)
    • addPreferredResponseContentType

      public void addPreferredResponseContentType(String responseContentType)
    • addProperty

      public void addProperty(String key, String value)
    • addResponseContentType

      public void addResponseContentType(String responseContentType)
    • addUserRole

      public void addUserRole(String role)
    • close

      public void close()
    • getAttribute

      public Object getAttribute(String name)
      Specified by:
      getAttribute in interface jakarta.portlet.PortletRequest
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
      Specified by:
      getAttributeNames in interface jakarta.portlet.PortletRequest
    • getAuthType

      public String getAuthType()
      Specified by:
      getAuthType in interface jakarta.portlet.PortletRequest
    • getContextPath

      public String getContextPath()
      Specified by:
      getContextPath in interface jakarta.portlet.PortletRequest
    • getCookies

      public jakarta.servlet.http.Cookie[] getCookies()
      Specified by:
      getCookies in interface jakarta.portlet.PortletRequest
    • getLocale

      public Locale getLocale()
      Specified by:
      getLocale in interface jakarta.portlet.PortletRequest
    • getLocales

      public Enumeration<Locale> getLocales()
      Specified by:
      getLocales in interface jakarta.portlet.PortletRequest
    • getParameter

      public String getParameter(String name)
      Specified by:
      getParameter in interface jakarta.portlet.PortletRequest
    • getParameterMap

      public Map<String,String[]> getParameterMap()
      Specified by:
      getParameterMap in interface jakarta.portlet.PortletRequest
    • getParameterNames

      public Enumeration<String> getParameterNames()
      Specified by:
      getParameterNames in interface jakarta.portlet.PortletRequest
    • getParameterValues

      public String[] getParameterValues(String name)
      Specified by:
      getParameterValues in interface jakarta.portlet.PortletRequest
    • getPortalContext

      public jakarta.portlet.PortalContext getPortalContext()
      Specified by:
      getPortalContext in interface jakarta.portlet.PortletRequest
    • getPortletContext

      public jakarta.portlet.PortletContext getPortletContext()
      Specified by:
      getPortletContext in interface jakarta.portlet.PortletRequest
    • getPortletMode

      public jakarta.portlet.PortletMode getPortletMode()
      Specified by:
      getPortletMode in interface jakarta.portlet.RenderState
    • getPortletSession

      public jakarta.portlet.PortletSession getPortletSession()
      Specified by:
      getPortletSession in interface jakarta.portlet.PortletRequest
    • getPortletSession

      public jakarta.portlet.PortletSession getPortletSession(boolean create)
      Specified by:
      getPortletSession in interface jakarta.portlet.PortletRequest
    • getPreferences

      public jakarta.portlet.PortletPreferences getPreferences()
      Specified by:
      getPreferences in interface jakarta.portlet.PortletRequest
    • getPrivateParameterMap

      public Map<String,String[]> getPrivateParameterMap()
      Specified by:
      getPrivateParameterMap in interface jakarta.portlet.PortletRequest
    • getProperties

      public Enumeration<String> getProperties(String key)
      Specified by:
      getProperties in interface jakarta.portlet.PortletRequest
    • getProperty

      public String getProperty(String key)
      Specified by:
      getProperty in interface jakarta.portlet.PortletRequest
    • getPropertyNames

      public Enumeration<String> getPropertyNames()
      Specified by:
      getPropertyNames in interface jakarta.portlet.PortletRequest
    • getPublicParameterMap

      public Map<String,String[]> getPublicParameterMap()
      Specified by:
      getPublicParameterMap in interface jakarta.portlet.PortletRequest
    • getRemoteUser

      public String getRemoteUser()
      Specified by:
      getRemoteUser in interface jakarta.portlet.PortletRequest
    • getRenderParameters

      public jakarta.portlet.RenderParameters getRenderParameters()
      Specified by:
      getRenderParameters in interface jakarta.portlet.RenderState
    • getRequestedSessionId

      public String getRequestedSessionId()
      Specified by:
      getRequestedSessionId in interface jakarta.portlet.PortletRequest
    • getResponseContentType

      public String getResponseContentType()
      Specified by:
      getResponseContentType in interface jakarta.portlet.PortletRequest
    • getResponseContentTypes

      public Enumeration<String> getResponseContentTypes()
      Specified by:
      getResponseContentTypes in interface jakarta.portlet.PortletRequest
    • getScheme

      public String getScheme()
      Specified by:
      getScheme in interface jakarta.portlet.PortletRequest
    • getServerName

      public String getServerName()
      Specified by:
      getServerName in interface jakarta.portlet.PortletRequest
    • getServerPort

      public int getServerPort()
      Specified by:
      getServerPort in interface jakarta.portlet.PortletRequest
    • getUserAgent

      public String getUserAgent()
      Specified by:
      getUserAgent in interface jakarta.portlet.PortletRequest
    • getUserPrincipal

      public Principal getUserPrincipal()
      Specified by:
      getUserPrincipal in interface jakarta.portlet.PortletRequest
    • getWindowID

      public String getWindowID()
      Specified by:
      getWindowID in interface jakarta.portlet.PortletRequest
    • getWindowState

      public jakarta.portlet.WindowState getWindowState()
      Specified by:
      getWindowState in interface jakarta.portlet.RenderState
    • isActive

      public boolean isActive()
    • isPortletModeAllowed

      public boolean isPortletModeAllowed(jakarta.portlet.PortletMode portletMode)
      Specified by:
      isPortletModeAllowed in interface jakarta.portlet.PortletRequest
    • isRequestedSessionIdValid

      public boolean isRequestedSessionIdValid()
      Specified by:
      isRequestedSessionIdValid in interface jakarta.portlet.PortletRequest
    • isSecure

      public boolean isSecure()
      Specified by:
      isSecure in interface jakarta.portlet.PortletRequest
    • isUserInRole

      public boolean isUserInRole(String role)
      Specified by:
      isUserInRole in interface jakarta.portlet.PortletRequest
    • isWindowStateAllowed

      public boolean isWindowStateAllowed(jakarta.portlet.WindowState windowState)
      Specified by:
      isWindowStateAllowed in interface jakarta.portlet.PortletRequest
    • registerPublicParameter

      public void registerPublicParameter(String name)
    • removeAttribute

      public void removeAttribute(String name)
      Specified by:
      removeAttribute in interface jakarta.portlet.PortletRequest
    • setAttribute

      public void setAttribute(String name, Object value)
      Specified by:
      setAttribute in interface jakarta.portlet.PortletRequest
    • setAuthType

      public void setAuthType(String authType)
    • setContextPath

      public void setContextPath(String contextPath)
    • setCookies

      public void setCookies(jakarta.servlet.http.Cookie... cookies)
    • setParameter

      public void setParameter(String key, String value)
    • setParameter

      public void setParameter(String key, String[] values)
    • setParameters

      public void setParameters(Map<String,String[]> parameters)
    • setPortletMode

      public void setPortletMode(jakarta.portlet.PortletMode portletMode)
    • setPortletSession

      public void setPortletSession(jakarta.portlet.PortletSession portletSession)
    • setPreferences

      public void setPreferences(jakarta.portlet.PortletPreferences portletPreferences)
    • setProperty

      public void setProperty(String key, String value)
    • setRemoteUser

      public void setRemoteUser(String remoteUser)
    • setRequestedSessionIdValid

      public void setRequestedSessionIdValid(boolean requestedSessionIdValid)
    • setScheme

      public void setScheme(String scheme)
    • setSecure

      public void setSecure(boolean secure)
    • setServerName

      public void setServerName(String serverName)
    • setServerPort

      public void setServerPort(int serverPort)
    • setUserPrincipal

      public void setUserPrincipal(Principal userPrincipal)
    • setWindowID

      public void setWindowID(String windowID)
    • setWindowState

      public void setWindowState(jakarta.portlet.WindowState windowState)
    • checkActive

      protected void checkActive() throws IllegalStateException
      Throws:
      IllegalStateException
    • getLifecyclePhase

      protected String getLifecyclePhase()