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: 23940 $ $Date: 2020-06-29 14:21:15 -0300 (Mon, 29 Jun 2020) $
    • Field Detail

      • CONTENT_IS_NOT_PUBLISHED_ERROR_REASON

        public static final String CONTENT_IS_NOT_PUBLISHED_ERROR_REASON
        See Also:
        Constant Field Values
      • ATTRIBUTE_ORIGINAL_URI

        public static final 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 String browserInfo
      • channelPath

        protected String channelPath
      • isSafeRenderMode

        protected boolean isSafeRenderMode
      • previousParametersXmlString

        protected String previousParametersXmlString
      • splitterPosition

        protected String splitterPosition
      • navigationPaneHidden

        protected String navigationPaneHidden
      • processActionRedirectDestination

        protected String processActionRedirectDestination
      • isPrinting

        protected boolean isPrinting
      • multiPartFormParameters

        protected Map<String,​String[]> multiPartFormParameters
      • multiPartFormServiceInterfaceInstance

        protected String multiPartFormServiceInterfaceInstance
      • uploadDir

        protected String uploadDir
      • parentChannelIds

        protected List<String> parentChannelIds
      • highlightInterfaceInst

        protected String highlightInterfaceInst
      • executedProcessActionServiceInterfaceInstanceId

        protected 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 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
      • getGeneratorPageCacheId

        protected 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​(String parameterName,
                                                 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