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  String browserInfo
           
protected  ChannelConfig channelConfig
           
protected  PresentationControllerHtml.DataPreviewMode dataPreviewMode
           
protected  String executedProcessActionServiceInterfaceInstanceId
          The identifier of the service interface instance that was the target of a process action executed in the current request.
protected  String highlightInterfaceInst
           
protected  boolean isPrinting
           
protected  boolean isSafeRenderMode
           
protected  Map<String,FileParameter> multiPartFormFileParameters
           
protected  Map<String,String[]> multiPartFormParameters
           
protected  String multiPartFormServiceInterfaceInstance
           
protected static INavigationLogger navigationLogger
           
protected  String navigationPaneHidden
           
protected  PageConfig pageConfig
           
protected  IPageRenderer pageRenderer
           
protected  PageWebResourceData pageWebResourceData
           
protected  PortalRequestParameters parameters
           
protected  List<String> parentChannelIds
           
protected  IPortalMode portalMode
           
protected  String previousParametersXmlString
           
protected  String processActionRedirectDestination
           
protected  File rawRequestInputFile
          The file where the raw request input content is stored.
protected  Map<String,String> replaceInterfacesMap
           
protected  IResource resource
           
protected  String rootChannelId
           
protected  ServiceContainer serviceContainer
           
protected  String splitterPosition
           
protected  String uploadDir
           
protected  PageWebResource webResource
           
 
Fields inherited from class lumis.portal.controller.ControllerHtml
out, request, response, sessionConfig, userConfig
 
Constructor Summary
PresentationControllerHtml(HttpServletRequest request, HttpServletResponse response, PageContext pageContext)
           
 
Method Summary
protected  void addMultiPartFormParameter(String parameterName, String parameterValue)
          Adds a multipart form parameter.
protected  void checkForFileUpload(ITransaction transaction)
           
protected  boolean checkForProtocolRedirect(ITransaction portalTransaction)
           
static void forward(String path, HttpServletRequest request, HttpServletResponse response)
          Forwards a request to the presentation controller.
protected  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 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 String previousParametersXmlString

splitterPosition

protected String splitterPosition

navigationPaneHidden

protected String navigationPaneHidden

processActionRedirectDestination

protected String processActionRedirectDestination

isPrinting

protected boolean isPrinting

multiPartFormParameters

protected Map<String,String[]> multiPartFormParameters

multiPartFormFileParameters

protected Map<String,FileParameter> multiPartFormFileParameters

multiPartFormServiceInterfaceInstance

protected String multiPartFormServiceInterfaceInstance

uploadDir

protected String uploadDir

parentChannelIds

protected List<String> parentChannelIds

rootChannelId

protected String rootChannelId

dataPreviewMode

protected PresentationControllerHtml.DataPreviewMode dataPreviewMode

highlightInterfaceInst

protected String highlightInterfaceInst

pageWebResourceData

protected PageWebResourceData pageWebResourceData

pageRenderer

protected IPageRenderer pageRenderer

replaceInterfacesMap

protected Map<String,String> replaceInterfacesMap

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

PresentationControllerHtml

public PresentationControllerHtml(HttpServletRequest request,
                                  HttpServletResponse response,
                                  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(String path,
                           HttpServletRequest request,
                           HttpServletResponse response)
                    throws ServletException,
                           IOException
Forwards a request to the presentation controller.

Parameters:
path - the path for the forward.
request - the request.
response - the response.
Throws:
ServletException
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 ServletException,
                                IOException
Renders the layout file for the current pageRenderer.

Throws:
ServletException - if an exception is thrown during the layout file processing.
IOException - if an exception is thrown during the output to the response.
Since:
5.6.0

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

checkForFileUpload

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

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


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.