lumis.portal.presentation
Class PresentationControllerHtml

Package class diagram package PresentationControllerHtml
java.lang.Object
  extended by lumis.portal.controller.ControllerHtml
      extended by lumis.portal.presentation.PresentationControllerHtml
Direct Known Subclasses:
XsltResultControllerHtml

public class PresentationControllerHtml
extends ControllerHtml

Entry class for page rendering. Called by main.jsp.

Since:
4.0.0

Nested Class Summary
static class PresentationControllerHtml.DataPreviewMode
           
protected  class PresentationControllerHtml.PresentationPageRenderer
          IPageRenderer implementation used by PresentationControllerHtml.
 
Field Summary
protected  java.lang.String browserInfo
           
protected  ChannelConfig channelConfig
           
protected  PresentationControllerHtml.DataPreviewMode dataPreviewMode
           
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.
protected  java.lang.String highlightInterfaceInst
           
protected  boolean isPrinting
           
protected  boolean isSafeRenderMode
           
protected  java.util.Map<java.lang.String,FileParameter> multiPartFormFileParameters
           
protected  java.util.Map<java.lang.String,java.lang.String[]> multiPartFormParameters
           
protected  java.lang.String multiPartFormServiceInterfaceInstance
           
protected static INavigationLogger navigationLogger
           
protected  java.lang.String navigationPaneHidden
           
protected  PageConfig pageConfig
           
protected  IPageRenderer pageRenderer
           
protected  PageWebResourceData pageWebResourceData
           
protected  PortalRequestParameters parameters
           
protected  java.util.List<java.lang.String> parentChannelIds
           
protected  IPortalMode portalMode
           
protected  java.lang.String previousParametersXmlString
           
protected  java.lang.String processActionRedirectDestination
           
protected  java.io.File rawRequestInputFile
          The file where the raw request input content is stored.
protected  IResource resource
           
protected  java.lang.String rootChannelId
           
protected  ServiceContainer serviceContainer
           
protected  java.lang.String splitterPosition
           
protected  java.lang.String uploadDir
           
protected  PageWebResource webResource
           
 
Fields inherited from class lumis.portal.controller.ControllerHtml
out, request, response, sessionConfig, userConfig
 
Constructor Summary
PresentationControllerHtml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.jsp.PageContext pageContext)
           
 
Method Summary
protected  void addMultiPartFormParameter(java.lang.String parameterName, java.lang.String parameterValue)
          Adds a multipart form parameter.
protected  void checkForFileUpload(ITransaction transaction)
           
protected  boolean checkForProtocolRedirect(ITransaction portalTransaction)
           
static void forward(java.lang.String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Forwards a request to the presentation controller.
protected  java.lang.String getGeneratorPageCacheId()
          Returns the identifier of the page cache the current request is generating.
protected  boolean hasProcessAction()
           
protected  void prepareForPageRendering(ITransaction portalTransaction)
          Performs any initialization required before page rendering.
protected  void processActionIfRequired(ITransaction portalTransaction)
          Checks to see if an action is to be processed.
protected  void renderLayoutFile()
          Renders the layout file for the current pageRenderer.
 void renderPage()
          Renders a portal page.
protected  void renderPageAdminMode(ITransaction portalTransaction)
          Renders the page in administration mode (F12).
protected  void renderPagePublisherMode(ITransaction portalTransaction)
          Renders the page in publisher perspective.
protected  void renderPageUserMode(ITransaction portalTransaction)
          Render the page in UserMode.
protected  void setBrowserInfo()
          Stores the request header HTTP_USER_AGENT value in a member variable
protected  void setDataPreviewMode(ITransaction portalTransaction)
          Sets the Page Preview Mode.
protected  void setLocale()
          If necessary, updates the locale of the current session according to the web resource being accessed.
protected  void setPageInfo(ITransaction portalTransaction)
          This method calls the presentationManager.getDefaultPage to calculate the page that needs to be rendered.
protected  void setPageMode(ITransaction portalTransaction)
          Sets the Page Mode.
protected  void setWebResource(ITransaction transaction)
          Sets webResource with the web resource instance for the current request.
protected  AccessError validatePageAccess(ITransaction transaction)
           
 
Methods inherited from class lumis.portal.controller.ControllerHtml
deleteCookie, getCookie, getRequestMode, getSessionConfig, loadUserInfo, setCookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

navigationLogger

protected static INavigationLogger navigationLogger

browserInfo

protected java.lang.String browserInfo

pageConfig

protected PageConfig pageConfig

webResource

protected PageWebResource webResource

channelConfig

protected ChannelConfig channelConfig

resource

protected IResource resource

serviceContainer

protected ServiceContainer serviceContainer

portalMode

protected IPortalMode portalMode

isSafeRenderMode

protected boolean isSafeRenderMode

parameters

protected PortalRequestParameters parameters

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

rootChannelId

protected java.lang.String rootChannelId

dataPreviewMode

protected PresentationControllerHtml.DataPreviewMode dataPreviewMode

highlightInterfaceInst

protected java.lang.String highlightInterfaceInst

pageWebResourceData

protected PageWebResourceData pageWebResourceData

pageRenderer

protected IPageRenderer pageRenderer

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
Constructor Detail

PresentationControllerHtml

public PresentationControllerHtml(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response,
                                  javax.servlet.jsp.PageContext pageContext)
                           throws ControllerException,
                                  PortalException
Throws:
ControllerException
PortalException
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 renderPageAdminMode(lumis.util.ITransaction)or 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

setPageMode

protected void setPageMode(ITransaction portalTransaction)
                    throws ControllerException,
                           PortalException
Sets the Page Mode. This could either be PortalContext.MODE_ADMIN, or PortalContext.MODE_USER.

Parameters:
portalTransaction -
Throws:
ControllerException
PortalException

setDataPreviewMode

protected void setDataPreviewMode(ITransaction portalTransaction)
                           throws ControllerException,
                                  PortalException
Sets the Page Preview Mode. This could either be true, or false.

Parameters:
portalTransaction -
Throws:
ControllerException
PortalException

renderPageUserMode

protected void renderPageUserMode(ITransaction portalTransaction)
                           throws ControllerException,
                                  PortalException
Render the page in UserMode.

Parameters:
portalTransaction -
Throws:
ControllerException
PortalException

forward

public static void forward(java.lang.String path,
                           javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Forwards a request to the presentation controller.

Parameters:
path - the path for the forward.
request - the request.
response - the response.
Throws:
javax.servlet.ServletException
java.io.IOException
Since:
5.0.0
See Also:
ServletRequest.getRequestDispatcher(String), RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)

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

validatePageAccess

protected AccessError validatePageAccess(ITransaction transaction)
                                  throws PortalException
Throws:
PortalException

checkForProtocolRedirect

protected boolean checkForProtocolRedirect(ITransaction portalTransaction)
                                    throws ControllerException,
                                           PortalException
Throws:
ControllerException
PortalException

processActionIfRequired

protected void 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()

renderPageAdminMode

protected void renderPageAdminMode(ITransaction portalTransaction)
                            throws ControllerException,
                                   PortalException
Renders the page in administration mode (F12). When the page is rendered in admin 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 javax.servlet.ServletException,
                                java.io.IOException
Renders the layout file for the current pageRenderer.

Throws:
javax.servlet.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

checkForFileUpload

protected void checkForFileUpload(ITransaction transaction)
                           throws PortalException
Throws:
PortalException

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


Lumisportal  6.1.0.111014 - Copyright © 2001-2007, Lumis. All Rights Reserved.