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

Field Summary
protected  String browserInfo
           
protected  ChannelConfig channelConfig
           
protected  lumis.portal.presentation.PresentationControllerHtml.DataPreviewMode dataPreviewMode
           
protected  String highlightInterfaceInst
           
protected  boolean isPrinting
           
protected  boolean isSafeRenderMode
           
protected  int mode
           
protected  Map<String,FileParameter> multiPartFormFileParameters
           
protected  Map<String,String[]> multiPartFormParameters
           
protected  String multiPartFormServiceInterfaceInstance
           
protected static INavigationLogger navigationLogger
           
protected  String navigationPaneHidden
           
protected  boolean pageCacheGeneratorRequest
           
protected  PageCacheConfig pageCacheSearchConfig
           
protected  PageConfig pageConfig
           
protected  PortalRequestParameters parameters
           
protected  List<String> parentChannelIds
           
protected  String previousParametersXmlString
           
protected  String processActionRedirectDestination
           
protected  IResource resource
           
protected  Map<String,String[]> responseActionRenderParameters
           
protected  String responseActionServiceInterfaceInstance
           
protected  String rootChannelId
           
protected  ServiceContainer serviceContainer
           
protected  String splitterPosition
           
protected  String uploadDir
           
 
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 checkForFileUpload(ITransaction transaction)
           
protected  boolean checkForProtocolRedirect(ITransaction portalTransaction)
           
protected  String generateAdminClientLocalizer()
           
protected  String generateSpan(ServiceInterfaceInstanceConfig serviceInterfaceInstConfig)
           
protected  String generateStyles(ServiceInterfaceInstanceConfig serviceInterfaceInstConfig)
           
protected  Document getPageLayout(ITransaction portalTransaction)
          Returns the current page layout.
protected  boolean hasProcessAction()
           
protected  boolean isChannelInPath(String channelId)
           
protected  void processActionIfRequired(ITransaction portalTransaction)
          Checks to see if an action is to be processed.
protected  void renderAdminHeader()
          Renders the Header information when the user is in Administration mode.
protected  String renderAdministrationMenu(String curChannelId, int iLevel, ITransaction transaction)
           
protected  void renderAdminModePageHeaderScripts()
           
protected  void renderNavigationPane(ITransaction transaction)
          Renders the administration navigation pane
 void renderPage()
          Renders a portal page.
protected  void renderPageAdminMode(ITransaction portalTransaction)
          Renders the page in administration mode (F12).
protected  void renderPageDocType()
          Renders the page DOCTYPE.
protected  void renderPageForm()
          Every page has a form named LumisPortalForm that stores global information like the previous parameters, the new parameters.
protected  void renderPageHeaderScripts()
          Renders the portal client side global variables including g_LumisDisplayMode,g_LumisChannelId, g_LumisPageId,g_LumisPageConfig.
protected  void renderPageLayout(ITransaction portalTransaction)
          Reads the layout XML for the page and actually renders the layout and Service Interfaces.
protected  void renderPageLinks(ITransaction portalTransaction)
          Renders any .css stylesheets specified for the page
protected  void renderPageMetaTags(ITransaction portalTransaction)
          Render the page meta tags.
protected  void renderPageTitle(ITransaction portalTransaction)
          Based on the pageConfig definition, the page title is specified.
protected  void renderPageUserMode(ITransaction portalTransaction)
          Render the page in UserMode.
protected  void renderSplitter()
          Renders the splitter bar between the work and navigation panes
protected  void renderWorkPane(ITransaction portalTransaction)
          Renders the right page in administration (F12) mode with the administration menus and the actual page layout
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 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  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

channelConfig

protected ChannelConfig channelConfig

resource

protected IResource resource

serviceContainer

protected ServiceContainer serviceContainer

mode

protected int mode

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

responseActionRenderParameters

protected Map<String,String[]> responseActionRenderParameters

responseActionServiceInterfaceInstance

protected String responseActionServiceInterfaceInstance

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

pageCacheGeneratorRequest

protected boolean pageCacheGeneratorRequest

pageCacheSearchConfig

protected PageCacheConfig pageCacheSearchConfig

dataPreviewMode

protected lumis.portal.presentation.PresentationControllerHtml.DataPreviewMode dataPreviewMode

highlightInterfaceInst

protected String highlightInterfaceInst
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

setPageMode

protected void setPageMode(ITransaction portalTransaction)
                    throws ControllerException,
                           PortalException
Sets the Page Mode. This could either be PortalContext.MODE_ADMIN, or PortalContext.MODE_USER. If in PortalContext.MODE_ADMIN, the mode is stored in a cookie named lumMode. If not the cookie is deleted.

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

renderPageDocType

protected void renderPageDocType()
                          throws IOException
Renders the page DOCTYPE. This must be used to be W3C compliant.

Throws:
IOException

setBrowserInfo

protected void setBrowserInfo()
Stores the request header HTTP_USER_AGENT value in a member variable

Parameters:
portalTransaction -

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

renderPageTitle

protected void renderPageTitle(ITransaction portalTransaction)
                        throws ControllerException,
                               PortalException
Based on the pageConfig definition, the page title is specified. If the page has a runtime service interface, the title of the page is changed to the runtime interface title.

Parameters:
portalTransaction -
Throws:
ControllerException
PortalException

renderPageMetaTags

protected void renderPageMetaTags(ITransaction portalTransaction)
                           throws ControllerException,
                                  PortalException
Render the page meta tags.

Parameters:
portalTransaction -
Throws:
ControllerException
PortalException

renderPageHeaderScripts

protected void renderPageHeaderScripts()
                                throws ControllerException,
                                       PortalException
Renders the portal client side global variables including g_LumisDisplayMode,g_LumisChannelId, g_LumisPageId,g_LumisPageConfig. The LumisPortal.js script is included in the page and if specified a client message is shown to the user after the page is loaded.

Throws:
ControllerException
PortalException

checkForProtocolRedirect

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

renderAdminModePageHeaderScripts

protected void renderAdminModePageHeaderScripts()
                                         throws ControllerException,
                                                PortalException
Throws:
ControllerException
PortalException

renderPageLinks

protected void renderPageLinks(ITransaction portalTransaction)
                        throws ControllerException,
                               PortalException
Renders any .css stylesheets specified for the page

Throws:
ControllerException
PortalException

renderPageForm

protected void renderPageForm()
                       throws ControllerException,
                              PortalException
Every page has a form named LumisPortalForm that stores global information like the previous parameters, the new parameters.

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

renderPageLayout

protected void renderPageLayout(ITransaction portalTransaction)
                         throws ControllerException,
                                PortalException
Reads the layout XML for the page and actually renders the layout and Service Interfaces. This method calls the service container to render the individual service interfaces.

Parameters:
portalTransaction -
Throws:
ControllerException
PortalException

getPageLayout

protected Document getPageLayout(ITransaction portalTransaction)
                          throws ControllerException,
                                 PortalException
Returns the current page layout. If the page has runtime interfaces, the layout is dynamically calculated. Otherwise the layout is taked from the page config definition.

Parameters:
portalTransaction -
Returns:
pageLayout
Throws:
ControllerException
PortalException

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

renderAdminHeader

protected void renderAdminHeader()
                          throws ControllerException,
                                 PortalException
Renders the Header information when the user is in Administration mode.

Throws:
ControllerException
PortalException

renderSplitter

protected void renderSplitter()
                       throws ControllerException,
                              PortalException
Renders the splitter bar between the work and navigation panes

Throws:
ControllerException
PortalException

renderWorkPane

protected void renderWorkPane(ITransaction portalTransaction)
                       throws ControllerException,
                              PortalException
Renders the right page in administration (F12) mode with the administration menus and the actual page layout

Parameters:
portalTransaction -
Throws:
ControllerException
PortalException

renderNavigationPane

protected void renderNavigationPane(ITransaction transaction)
                             throws ControllerException,
                                    PortalException
Renders the administration navigation pane

Throws:
ControllerException
PortalException

renderAdministrationMenu

protected String renderAdministrationMenu(String curChannelId,
                                          int iLevel,
                                          ITransaction transaction)
                                   throws PortalException
Throws:
PortalException

generateStyles

protected String generateStyles(ServiceInterfaceInstanceConfig serviceInterfaceInstConfig)
                         throws ControllerException,
                                PortalException
Throws:
ControllerException
PortalException

generateSpan

protected String generateSpan(ServiceInterfaceInstanceConfig serviceInterfaceInstConfig)
                       throws ControllerException,
                              PortalException
Throws:
ControllerException
PortalException

generateAdminClientLocalizer

protected String generateAdminClientLocalizer()
                                       throws ControllerException,
                                              PortalException
Throws:
ControllerException
PortalException

isChannelInPath

protected boolean isChannelInPath(String channelId)

checkForFileUpload

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


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