Class PortalRequestContext

java.lang.Object
org.exoplatform.web.application.RequestContext
org.exoplatform.webui.application.WebuiRequestContext
org.exoplatform.portal.application.PortalRequestContext

public class PortalRequestContext extends WebuiRequestContext
This class extends the abstract WebuiRequestContext which itself extends the RequestContext one

It mainly implements the abstract methods and overide some.

  • Field Details

  • Constructor Details

    • PortalRequestContext

      public PortalRequestContext(WebuiApplication app, org.exoplatform.web.ControllerContext controllerContext, String requestSiteType, String requestSiteName, String requestPath, Locale requestLocale)
      Analyze a request and split this request's URI to get useful information then keep it in following properties of PortalRequestContext :
      1. requestURI : The decoded URI of this request
      2. portalOwner : The portal name ( "classic" for instance )
      3. portalURI : The URI to current portal ( "/portal/public/classic/ for instance )
      4. nodePath : The path that is used to reflect to a navigation node
  • Method Details

    • newURL

      public <R, U extends org.exoplatform.web.url.PortalURL<R, U>> U newURL(org.exoplatform.web.url.ResourceType<R,U> resourceType, org.exoplatform.web.url.URLFactory urlFactory)
      Specified by:
      newURL in class org.exoplatform.web.application.RequestContext
    • getJavascriptManager

      public org.exoplatform.web.application.JavascriptManager getJavascriptManager()
      Overrides:
      getJavascriptManager in class WebuiRequestContext
    • getSkin

      public String getSkin()
    • getUserPortal

      public org.exoplatform.portal.mop.user.UserPortal getUserPortal()
      Specified by:
      getUserPortal in class org.exoplatform.web.application.RequestContext
    • isNoCache

      public boolean isNoCache()
    • isDraftPage

      public boolean isDraftPage()
    • getNavigationNode

      public org.exoplatform.portal.mop.user.UserNode getNavigationNode()
    • getUserPortalConfig

      public org.exoplatform.portal.config.UserPortalConfig getUserPortalConfig()
    • refreshPortalConfig

      public void refreshPortalConfig()
    • getUIPage

      public UIPage getUIPage(org.exoplatform.portal.mop.user.UserNode pageNode, UIPortal uiPortal) throws Exception
      Throws:
      Exception
    • getInitialURI

      public String getInitialURI()
    • getControllerContext

      public org.exoplatform.web.ControllerContext getControllerContext()
    • refreshResourceBundle

      public void refreshResourceBundle() throws Exception
      Throws:
      Exception
    • requestAuthenticationLogin

      public void requestAuthenticationLogin() throws Exception
      Throws:
      Exception
    • requestAuthenticationLogin

      public void requestAuthenticationLogin(Map<String,String> params) throws Exception
      Throws:
      Exception
    • setPageTitle

      public void setPageTitle(String title)
    • getDynamicPortalConfig

      public org.exoplatform.portal.config.model.PortalConfig getDynamicPortalConfig() throws Exception
      Throws:
      Exception
    • addOnRequestEnd

      public void addOnRequestEnd(Runnable runnable)
    • onRequestEnd

      public void onRequestEnd()
    • getTitle

      public String getTitle() throws Exception
      Throws:
      Exception
    • getURLFactory

      public org.exoplatform.web.url.URLFactory getURLFactory()
      Specified by:
      getURLFactory in class org.exoplatform.web.application.RequestContext
    • getOrientation

      public org.exoplatform.services.resources.Orientation getOrientation()
      Specified by:
      getOrientation in class org.exoplatform.web.application.RequestContext
    • getRequestLocale

      public Locale getRequestLocale()
    • setLocale

      public void setLocale(Locale locale)
    • getLocale

      public Locale getLocale()
      Overrides:
      getLocale in class org.exoplatform.web.application.RequestContext
    • getMetaInformation

      public Map<String,String> getMetaInformation()
    • getCacheLevel

      public String getCacheLevel()
    • getRequestParameter

      public String getRequestParameter(String name)
      Specified by:
      getRequestParameter in class org.exoplatform.web.application.RequestContext
    • getRequestParameterValues

      public String[] getRequestParameterValues(String name)
      Specified by:
      getRequestParameterValues in class org.exoplatform.web.application.RequestContext
    • getPortletParameters

      public Map<String,String[]> getPortletParameters()
    • getRequestContextPath

      public final String getRequestContextPath()
      Specified by:
      getRequestContextPath in class WebuiRequestContext
    • getPortalContextPath

      public String getPortalContextPath()
      Description copied from class: WebuiRequestContext
      Returns the context path of the portal or null if it does not execute in the context of an aggregated portal request.
      Specified by:
      getPortalContextPath in class WebuiRequestContext
      Returns:
      the portal context path
    • getActionParameterName

      public String getActionParameterName()
      Overrides:
      getActionParameterName in class WebuiRequestContext
    • getUIComponentIdParameterName

      public String getUIComponentIdParameterName()
      Overrides:
      getUIComponentIdParameterName in class WebuiRequestContext
    • getSiteType

      public org.exoplatform.portal.mop.SiteType getSiteType()
    • getSiteName

      public String getSiteName()
    • getSiteKey

      public org.exoplatform.portal.mop.SiteKey getSiteKey()
    • getPortalOwner

      public String getPortalOwner()
    • getMetaPortal

      public String getMetaPortal()
      Returns:
      meta portal name
    • getNodePath

      public String getNodePath()
    • getRequestURI

      public String getRequestURI()
    • getPortalURI

      public String getPortalURI()
    • getURLBuilder

      public org.exoplatform.web.application.URLBuilder<UIComponent> getURLBuilder()
      Specified by:
      getURLBuilder in class WebuiRequestContext
    • getAccessPath

      public int getAccessPath()
    • getRemoteUser

      public final String getRemoteUser()
      Overrides:
      getRemoteUser in class org.exoplatform.web.application.RequestContext
    • isUserInRole

      public final boolean isUserInRole(String roleUser)
      Overrides:
      isUserInRole in class org.exoplatform.web.application.RequestContext
    • getWriter

      public final Writer getWriter() throws IOException
      Overrides:
      getWriter in class org.exoplatform.web.application.RequestContext
      Throws:
      IOException
    • setWriter

      public final void setWriter(Writer writer)
      Overrides:
      setWriter in class org.exoplatform.web.application.RequestContext
    • useAjax

      public final boolean useAjax()
      Specified by:
      useAjax in class org.exoplatform.web.application.RequestContext
    • getRequest

      public jakarta.servlet.http.HttpServletRequest getRequest()
      Specified by:
      getRequest in class WebuiRequestContext
    • getResponse

      public final jakarta.servlet.http.HttpServletResponse getResponse()
      Specified by:
      getResponse in class WebuiRequestContext
    • getFullRender

      public final boolean getFullRender()
      Overrides:
      getFullRender in class org.exoplatform.web.application.RequestContext
      See Also:
      • RequestContext.getFullRender()
    • setFullRender

      @Deprecated public final void setFullRender(boolean forceFullUpdate)
      Deprecated.
      Sets a boolean value to force whether portal will be fully rendered and it is only effective to an Ajax request.
      if the value is set to true, it means :
      1) Only portal ui components are rendered
      2) Portlets will be fully rendered if are inner of the portal ui components being updated
      Parameters:
      forceFullUpdate - This method is deprecated, ignoreAJAXUpdateOnPortlets should be used instead
    • ignoreAJAXUpdateOnPortlets

      public final void ignoreAJAXUpdateOnPortlets(boolean ignoreAJAXUpdateOnPortlets)
      Call to this method makes sense only in the scope of an AJAX request. Invoking ignoreAJAXUpdateOnPortlets(true) as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX. In the request response, all the blocks PortletRespond are empty. The content displayed in portlet windows are retrieved by non-AJAX render request to associated portlet object.
      Parameters:
      ignoreAJAXUpdateOnPortlets -
    • sendError

      public final void sendError(int sc) throws IOException
      Throws:
      IOException
    • sendRedirect

      public final void sendRedirect(String url) throws IOException
      Specified by:
      sendRedirect in class WebuiRequestContext
      Throws:
      IOException
    • setHeaders

      public void setHeaders(Map<String,String> headers)
    • getExtraMarkupHeadersAsStrings

      public List<String> getExtraMarkupHeadersAsStrings() throws Exception
      Throws:
      Exception
    • getExtraMarkupHeaders

      public List<Element> getExtraMarkupHeaders()
      Get the extra markup headers to add to the head of the html.
      Returns:
      The markup to be added.
    • addExtraMarkupHeader

      public void addExtraMarkupHeader(Element element, String portletWindowId)
      Add an extra markup to the head of the html page.
      Parameters:
      element - The element to add
      portletWindowId - The ID of portlet window contributing markup header
    • getNavigationData

      public RequestNavigationData getNavigationData()
    • isMaximizePortlet

      public boolean isMaximizePortlet()
    • getMaximizedPortletId

      public String getMaximizedPortletId()
    • getCurrentInstance

      public static PortalRequestContext getCurrentInstance()