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

    • PUBLIC_ACCESS

      public static final int PUBLIC_ACCESS
      See Also:
    • PRIVATE_ACCESS

      public static final int PRIVATE_ACCESS
      See Also:
    • UI_COMPONENT_ACTION

      public static final String UI_COMPONENT_ACTION
      See Also:
    • UI_COMPONENT_ID

      public static final String UI_COMPONENT_ID
      See Also:
    • TARGET_NODE

      public static final String TARGET_NODE
      See Also:
    • CACHE_LEVEL

      public static final String CACHE_LEVEL
      See Also:
    • REQUEST_TITLE

      public static final String REQUEST_TITLE
    • REQUEST_METADATA

      public static final String REQUEST_METADATA
    • portalLayoutService

      public static org.exoplatform.portal.config.DynamicPortalLayoutService portalLayoutService
    • portalConfigService

      public static org.exoplatform.portal.config.UserPortalConfigService portalConfigService
    • layoutService

      public static org.exoplatform.portal.mop.service.LayoutService layoutService
    • ssoHelper

      public static org.exoplatform.web.security.sso.SSOHelper ssoHelper
    • javascriptManager

      protected org.exoplatform.web.application.JavascriptManager javascriptManager
  • 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

    • setUiPage

      public void setUiPage(UIPage uiPage)
    • 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
    • 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
    • getFullRender

      public final boolean getFullRender()
      Overrides:
      getFullRender in class org.exoplatform.web.application.RequestContext
      See Also:
      • RequestContext.getFullRender()
    • 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()
    • isDraftSite

      public boolean isDraftSite()
    • isDraftPage

      public boolean isDraftPage()
    • getNavigationNode

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

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

      public UIPortal getUiPortal()
    • getUiPage

      public UIPage getUiPage()
    • getInitialURI

      public String getInitialURI()
    • getControllerContext

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

      public void refreshResourceBundle()
    • requestAuthenticationLogin

      public void requestAuthenticationLogin()
    • requestAuthenticationLogin

      public void requestAuthenticationLogin(Map<String,String> params)
    • 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()
    • getURLFactory

      public org.exoplatform.web.url.URLFactory getURLFactory()
      Specified by:
      getURLFactory 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()
    • getSiteId

      public long getSiteId()
    • getSiteLabel

      public String getSiteLabel()
    • getPortalOwner

      public String getPortalOwner()
    • getMetaPortal

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

      public String getGlobalPortal()
      Returns:
      global 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()
    • 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()
    • 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()
    • isFullRendering

      public boolean isFullRendering()
    • isShowMaxWindow

      public boolean isShowMaxWindow()
    • isHideSharedLayout

      public boolean isHideSharedLayout()
    • getMaximizedPortletId

      public String getMaximizedPortletId()
    • startServerTime

      public boolean startServerTime(String name)
    • endServerTime

      public void endServerTime(String name)
    • commitResponse

      public void commitResponse()
    • getCurrentInstance

      public static PortalRequestContext getCurrentInstance()