Class PresentationControllerHtml

  • Direct Known Subclasses:
    XsltResultControllerHtml

    public class PresentationControllerHtml
    extends ControllerHtml
    Entry class for page rendering. Called by main.jsp.
    Since:
    4.0.0
    Version:
    $Revision: 25475 $ $Date: 2023-02-27 17:42:56 -0300 (Mon, 27 Feb 2023) $
    • Field Detail

      • CONTENT_IS_NOT_PUBLISHED_ERROR_REASON

        public static final java.lang.String CONTENT_IS_NOT_PUBLISHED_ERROR_REASON
        See Also:
        Constant Field Values
      • CONTENT_IS_NOT_PUBLISHED_FOR_USER_ERROR_REASON

        public static final java.lang.String CONTENT_IS_NOT_PUBLISHED_FOR_USER_ERROR_REASON
        See Also:
        Constant Field Values
      • ERROR_REASON_HEADER_NAME

        public static final java.lang.String ERROR_REASON_HEADER_NAME
        See Also:
        Constant Field Values
      • ATTRIBUTE_ORIGINAL_URI

        public static final java.lang.String ATTRIBUTE_ORIGINAL_URI
        The name of the attribute where the original URI should be stored when performing a dispatch to this controller.
        Since:
        5.0.0
        See Also:
        Constant Field Values
      • browserInfo

        protected java.lang.String browserInfo
      • channelPath

        protected java.lang.String channelPath
      • isSafeRenderMode

        protected boolean isSafeRenderMode
      • previousParametersXmlString

        protected java.lang.String previousParametersXmlString
      • splitterPosition

        protected java.lang.String splitterPosition
      • navigationPaneHidden

        protected java.lang.String navigationPaneHidden
      • processActionRedirectDestination

        protected java.lang.String processActionRedirectDestination
      • isPrinting

        protected boolean isPrinting
      • multiPartFormParameters

        protected java.util.Map<java.lang.String,​java.lang.String[]> multiPartFormParameters
      • multiPartFormFileParameters

        protected java.util.Map<java.lang.String,​FileParameter> multiPartFormFileParameters
      • multiPartFormServiceInterfaceInstance

        protected java.lang.String multiPartFormServiceInterfaceInstance
      • uploadDir

        protected java.lang.String uploadDir
      • parentChannelIds

        protected java.util.List<java.lang.String> parentChannelIds
      • highlightInterfaceInst

        protected java.lang.String highlightInterfaceInst
      • executedProcessActionServiceInterfaceInstanceId

        protected java.lang.String executedProcessActionServiceInterfaceInstanceId
        The identifier of the service interface instance that was the target of a process action executed in the current request.
        Since:
        5.5.0
      • rawRequestInputFile

        protected java.io.File rawRequestInputFile
        The file where the raw request input content is stored.
        Since:
        5.5.0
    • Method Detail

      • renderPage

        public void renderPage()
                        throws ControllerException,
                               PortalException
        Renders a portal page. Based on the logged on user, pageId passed and channelId passed in the request query string, this method calculates and renders the appropriate page. This method also checks if there is a ProcessAction to be handled before rendering the page. Based on the page mode, this method either calls #renderPageAdminModeor renderPage()
        Throws:
        ControllerException
        PortalException
      • prepareForPageRendering

        protected void prepareForPageRendering​(ITransaction portalTransaction)
                                        throws PortalException
        Performs any initialization required before page rendering. Called before rendering Admin or User mode.
        Parameters:
        portalTransaction -
        Throws:
        PortalException
        Since:
        4.2.0
      • setBrowserInfo

        protected void setBrowserInfo()
        Stores the request header HTTP_USER_AGENT value in a member variable
        Parameters:
        portalTransaction -
      • setWebResource

        protected void setWebResource​(ITransaction transaction)
                               throws PortalException
        Sets webResource with the web resource instance for the current request.
        Parameters:
        transaction - transaction for persistence access.
        Throws:
        PortalException
        Since:
        5.0.0
      • setLocale

        protected void setLocale()
        If necessary, updates the locale of the current session according to the web resource being accessed.
        Since:
        6.0.1
      • setPageInfo

        protected void setPageInfo​(ITransaction portalTransaction)
                            throws ControllerException,
                                   PortalException
        This method calls the presentationManager.getDefaultPage to calculate the page that needs to be rendered. If the presentation manager could not calculate the page, the user is redirected to lumisadmin.jsp page. If the destination page is the framework blank page, the mode of the page is forced to PortalContext.MODE_USER since the blank page should never be modified in terms of layout etc. If runtime interface and service instance is specified, the appropriate values are added to the page config.
        Parameters:
        portalTransaction -
        Throws:
        ControllerException
        PortalException
      • processActionIfRequired

        protected ITransaction processActionIfRequired​(ITransaction portalTransaction)
                                                throws ControllerException,
                                                       PortalException
        Checks to see if an action is to be processed. This is detected based on the page parameter PageConfig.PAGE_PARAMETER_PROCESS_ACTION has the value of 1. Once the ProcessAction is handled, the returned render parameters are remembered to pass on to the interface instance that initiated the process action. If no render parameters are returned, the interface instance that initiated the process action will not receive any parameters for its render method.
        Parameters:
        portalTransaction -
        Throws:
        ControllerException
        PortalException
      • hasProcessAction

        protected boolean hasProcessAction()
      • renderPagePortalStudioMode

        protected void renderPagePortalStudioMode​(ITransaction portalTransaction)
                                           throws ControllerException,
                                                  PortalException
        Renders the page in portal studio mode . When the page is rendered in this mode, several additional javascript files need to be included in the page. Besides the javascript, the navigationPane, workPane, splitter and header need to be rendered as well.
        Parameters:
        portalTransaction -
        Throws:
        ControllerException
        PortalException
      • renderPagePortalSettingsMode

        protected void renderPagePortalSettingsMode​(ITransaction portalTransaction)
                                             throws ControllerException,
                                                    PortalException
        Renders the page in portal settings mode . When the page is rendered in this mode, several additional javascript files need to be included in the page. Besides the javascript, the navigationPane, workPane, splitter and header need to be rendered as well.
        Parameters:
        portalTransaction -
        Throws:
        ControllerException
        PortalException
      • renderPagePublisherMode

        protected void renderPagePublisherMode​(ITransaction portalTransaction)
                                        throws ControllerException,
                                               PortalException
        Renders the page in publisher perspective. When the page is rendered in publisher perspective, several additional javascript files need to be included in the page. Besides the javascript, the navigationPane, workPane, splitter and header need to be rendered as well.
        Parameters:
        portalTransaction - the current transaction
        Throws:
        ControllerException
        PortalException
      • renderLayoutFile

        protected void renderLayoutFile()
                                 throws ServletException,
                                        java.io.IOException
        Renders the layout file for the current pageRenderer.
        Throws:
        ServletException - if an exception is thrown during the layout file processing.
        java.io.IOException - if an exception is thrown during the output to the response.
        Since:
        5.6.0
      • getGeneratorPageCacheId

        protected java.lang.String getGeneratorPageCacheId()
        Returns the identifier of the page cache the current request is generating.
        Returns:
        the page cache identifier, or null if the current request is not for generating a page cache.
        Since:
        5.0.0
      • addMultiPartFormParameter

        protected void addMultiPartFormParameter​(java.lang.String parameterName,
                                                 java.lang.String parameterValue)
        Adds a multipart form parameter. This method checks if a parameter with the same name was previously included. If so, the new parameter value is appended to the end of the values array.
        Parameters:
        parameterName - The name of the parameter.
        parameterValue - The value of the parameter.
        Since:
        4.2.0
      • setUACompatibleHeader

        protected void setUACompatibleHeader()
                                      throws PortalException
        Sets a new HTTP Header with the value stored in the property lumis.portal.presentation.X-UA-Compatible. If the property is not defined the default value, IE=edge, will be used.
        Throws:
        PortalException
        Since:
        7.0.0
      • getPageWebResourceBeingRendered

        public static PageWebResource getPageWebResourceBeingRendered​(HttpServletRequest request)
        Returns the page web resource being rendered in the given request (if any).
        Parameters:
        request - the request.
        Returns:
        the page web resource being rendered in the given request (if any).
        Since:
        10.2.0