org.apache.jetspeed.aggregator.impl
Class HeaderAggregatorImpl

java.lang.Object
  extended by org.apache.jetspeed.aggregator.impl.HeaderAggregatorImpl
All Implemented Interfaces:
org.apache.jetspeed.aggregator.Aggregator, org.apache.jetspeed.aggregator.PageAggregator

public class HeaderAggregatorImpl
extends Object
implements org.apache.jetspeed.aggregator.PageAggregator

HeaderAggregator builds the content required to render a page of portlets.

Version:
$Id: HeaderAggregatorImpl.java 359125 2005-12-26 23:16:39Z rwatler $
Author:
Rapha?l Luta , David Sean Taylor , Steve Milek

Field Summary
private  org.apache.jetspeed.container.url.BasePortalURL baseUrlAccess
          base portal URL to override default URL server info from servlet
private  org.apache.jetspeed.decoration.DecorationFactory decorationFactory
           
protected static String EOL
           
private  org.apache.jetspeed.factory.PortletFactory factory
           
private  Map headerConfiguration
           
private  Map headerDynamicConfigurationDefault
           
private  Map headerNamedResourcesAddedFragmentsDefault
           
private  Map headerNamedResourcesDefault
           
private  org.apache.jetspeed.headerresource.HeaderResourceFactory headerResourceFactory
           
private  Map headerResourceRegistry
           
private  boolean isDesktop
           
protected static org.apache.commons.logging.Log log
           
private  org.apache.jetspeed.container.window.PortletWindowAccessor windowAccessor
           
 
Constructor Summary
HeaderAggregatorImpl(org.apache.jetspeed.factory.PortletFactory factory, org.apache.jetspeed.container.window.PortletWindowAccessor windowAccessor, org.apache.jetspeed.headerresource.HeaderResourceFactory headerResourceFactory, boolean isDesktop, Map headerConfiguration, Map headerResourceRegistry, org.apache.jetspeed.decoration.DecorationFactory decorationFactory)
           
HeaderAggregatorImpl(org.apache.jetspeed.factory.PortletFactory factory, org.apache.jetspeed.container.window.PortletWindowAccessor windowAccessor, org.apache.jetspeed.headerresource.HeaderResourceFactory headerResourceFactory, boolean isDesktop, Map headerConfiguration, Map headerResourceRegistry, org.apache.jetspeed.decoration.DecorationFactory decorationFactory, org.apache.jetspeed.container.url.BasePortalURL baseUrlAccess)
           
 
Method Summary
protected  boolean aggregateAndRender(org.apache.jetspeed.om.page.ContentFragment fragment, org.apache.jetspeed.request.RequestContext context, org.apache.jetspeed.om.page.ContentPage page)
           
 void build(org.apache.jetspeed.request.RequestContext context)
          Builds the portlet set defined in the context into a portlet tree.
protected  boolean canAddHeaderNamedResourceFragment(String headerFragmentName, HashMap namedResourcesAddedFragmentsDefault, String[] registryContent)
           
protected  org.apache.jetspeed.container.url.BasePortalURL getBaseUrlAccess()
           
protected  Map getHeaderConfiguration()
           
protected  Map getHeaderDynamicConfigurationDefault()
           
protected  Map getHeaderNamedResourcesAddedFragmentsDefault()
           
protected  Map getHeaderNamedResourcesDefault()
           
protected  org.apache.jetspeed.headerresource.HeaderResourceFactory getHeaderResourceFactory()
           
protected  Map getHeaderResourceRegistry()
           
protected  org.apache.jetspeed.factory.PortletFactory getPortletFactory()
           
protected  org.apache.jetspeed.container.window.PortletWindowAccessor getPortletWindowAccessor()
           
protected  void initializeDesktopHeaderConfigurationDefaults(Map desktopConfigMap, HashMap namedResourcesDefault, HashMap namedResourcesAddedFragmentsDefault, HashMap headerDynamicConfigurationDefault)
           
protected  void initializeDojoHeaderConfigurationDefaults(Map dojoConfigMap, HashMap namedResourcesDefault, HashMap namedResourcesAddedFragmentsDefault, HashMap headerDynamicConfigurationDefault)
          Read dojo header configuration settings and compile dojo header resource defaults
private  void initializeHeaderConfiguration(Map headerConfigArg, Map headerRsrcRegistryArg)
          Initialize header configuration, making immutable copies of the data structures and compiling as much finished static header content as possible (to minimize repetitive work per request)
protected  Map initializeHeaderConfigurationDefaults(HashMap namedResourcesDefault, HashMap namedResourcesAddedFragmentsDefault)
          Initialize dynamic-header-configuration and call initializeHeaderConfigurationEntryDefaults() for each key in headerConfiguration Map, allowing for each to add resources and settings to: headerNamedResourcesDefault, headerNamedResourcesAddedFragmentsDefault and headerDynamicConfigurationDefault If no specific handler is defined for a headerConfiguration key, the entry is copied to headerDynamicConfigurationDefault otherwise the handler is responsible for adding information to headerDynamicConfigurationDefault headerConfiguration handlers are currently defined for the headerConfiguration keys: "header.order" - HeaderResource.HEADER_CONFIG_ORDER "header.types" - HeaderResource.HEADER_CONFIG_TYPES "header.requiredflag" - HeaderResource.HEADER_CONFIG_REQUIREDFLAG "dojo" - HeaderResource.HEADER_CONFIG_DOJO "desktop" - HeaderResource.HEADER_CONFIG_DESKTOP
protected  boolean initializeHeaderConfigurationEntryDefaults(Object headerConfigKey, Object headerConfigValue, HashMap namedResourcesDefault, HashMap namedResourcesAddedFragmentsDefault, HashMap headerDynamicConfigurationDefault)
          Intended as derived class hook into header configuration process
protected  void initializeHeaderOrderConfigurationDefaults(HashMap namedResourcesDefault, HashMap namedResourcesAddedFragmentsDefault, HashMap headerDynamicConfigurationDefault)
           
protected  void initializeMissingHeaderConfigurationEntryDefaults(HashMap namedResourcesDefault, HashMap namedResourcesAddedFragmentsDefault, HashMap headerDynamicConfigurationDefault)
           
protected  boolean isDesktop()
           
protected  void orderNamedHeaderResource(String headerName, Map headerDynamicConfigurationDefault)
           
protected  void postinitializeHeaderOrderConfigurationDefaults(HashMap headerDynamicConfigurationDefault)
           
protected  void registerAndOrderNamedHeaderResource(String headerName, String headerType, String headerReqFlag, Map headerDynamicConfigurationDefault)
           
protected  boolean renderHeaderFragment(org.apache.jetspeed.request.RequestContext context, org.apache.jetspeed.om.page.ContentFragment fragment)
           
protected  void setNamedHeaderResourceProperties(String headerName, String headerType, String headerReqFlag, Map headerDynamicConfigurationDefault)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log

EOL

protected static final String EOL
See Also:
Constant Field Values

factory

private org.apache.jetspeed.factory.PortletFactory factory

windowAccessor

private org.apache.jetspeed.container.window.PortletWindowAccessor windowAccessor

headerResourceFactory

private org.apache.jetspeed.headerresource.HeaderResourceFactory headerResourceFactory

decorationFactory

private org.apache.jetspeed.decoration.DecorationFactory decorationFactory

isDesktop

private boolean isDesktop

headerConfiguration

private Map headerConfiguration

headerResourceRegistry

private Map headerResourceRegistry

headerDynamicConfigurationDefault

private Map headerDynamicConfigurationDefault

headerNamedResourcesDefault

private Map headerNamedResourcesDefault

headerNamedResourcesAddedFragmentsDefault

private Map headerNamedResourcesAddedFragmentsDefault

baseUrlAccess

private org.apache.jetspeed.container.url.BasePortalURL baseUrlAccess
base portal URL to override default URL server info from servlet

Constructor Detail

HeaderAggregatorImpl

public HeaderAggregatorImpl(org.apache.jetspeed.factory.PortletFactory factory,
                            org.apache.jetspeed.container.window.PortletWindowAccessor windowAccessor,
                            org.apache.jetspeed.headerresource.HeaderResourceFactory headerResourceFactory,
                            boolean isDesktop,
                            Map headerConfiguration,
                            Map headerResourceRegistry,
                            org.apache.jetspeed.decoration.DecorationFactory decorationFactory)

HeaderAggregatorImpl

public HeaderAggregatorImpl(org.apache.jetspeed.factory.PortletFactory factory,
                            org.apache.jetspeed.container.window.PortletWindowAccessor windowAccessor,
                            org.apache.jetspeed.headerresource.HeaderResourceFactory headerResourceFactory,
                            boolean isDesktop,
                            Map headerConfiguration,
                            Map headerResourceRegistry,
                            org.apache.jetspeed.decoration.DecorationFactory decorationFactory,
                            org.apache.jetspeed.container.url.BasePortalURL baseUrlAccess)
Method Detail

initializeHeaderConfiguration

private void initializeHeaderConfiguration(Map headerConfigArg,
                                           Map headerRsrcRegistryArg)
Initialize header configuration, making immutable copies of the data structures and compiling as much finished static header content as possible (to minimize repetitive work per request)


initializeHeaderConfigurationDefaults

protected Map initializeHeaderConfigurationDefaults(HashMap namedResourcesDefault,
                                                    HashMap namedResourcesAddedFragmentsDefault)
Initialize dynamic-header-configuration and call initializeHeaderConfigurationEntryDefaults() for each key in headerConfiguration Map, allowing for each to add resources and settings to: headerNamedResourcesDefault, headerNamedResourcesAddedFragmentsDefault and headerDynamicConfigurationDefault If no specific handler is defined for a headerConfiguration key, the entry is copied to headerDynamicConfigurationDefault otherwise the handler is responsible for adding information to headerDynamicConfigurationDefault headerConfiguration handlers are currently defined for the headerConfiguration keys: "header.order" - HeaderResource.HEADER_CONFIG_ORDER "header.types" - HeaderResource.HEADER_CONFIG_TYPES "header.requiredflag" - HeaderResource.HEADER_CONFIG_REQUIREDFLAG "dojo" - HeaderResource.HEADER_CONFIG_DOJO "desktop" - HeaderResource.HEADER_CONFIG_DESKTOP


initializeHeaderOrderConfigurationDefaults

protected void initializeHeaderOrderConfigurationDefaults(HashMap namedResourcesDefault,
                                                          HashMap namedResourcesAddedFragmentsDefault,
                                                          HashMap headerDynamicConfigurationDefault)

postinitializeHeaderOrderConfigurationDefaults

protected void postinitializeHeaderOrderConfigurationDefaults(HashMap headerDynamicConfigurationDefault)

initializeHeaderConfigurationEntryDefaults

protected boolean initializeHeaderConfigurationEntryDefaults(Object headerConfigKey,
                                                             Object headerConfigValue,
                                                             HashMap namedResourcesDefault,
                                                             HashMap namedResourcesAddedFragmentsDefault,
                                                             HashMap headerDynamicConfigurationDefault)
Intended as derived class hook into header configuration process

Returns:
true if headerConfigKey has been processed or false if default processing should occur

initializeMissingHeaderConfigurationEntryDefaults

protected void initializeMissingHeaderConfigurationEntryDefaults(HashMap namedResourcesDefault,
                                                                 HashMap namedResourcesAddedFragmentsDefault,
                                                                 HashMap headerDynamicConfigurationDefault)

registerAndOrderNamedHeaderResource

protected void registerAndOrderNamedHeaderResource(String headerName,
                                                   String headerType,
                                                   String headerReqFlag,
                                                   Map headerDynamicConfigurationDefault)

orderNamedHeaderResource

protected void orderNamedHeaderResource(String headerName,
                                        Map headerDynamicConfigurationDefault)

setNamedHeaderResourceProperties

protected void setNamedHeaderResourceProperties(String headerName,
                                                String headerType,
                                                String headerReqFlag,
                                                Map headerDynamicConfigurationDefault)

canAddHeaderNamedResourceFragment

protected boolean canAddHeaderNamedResourceFragment(String headerFragmentName,
                                                    HashMap namedResourcesAddedFragmentsDefault,
                                                    String[] registryContent)

initializeDesktopHeaderConfigurationDefaults

protected void initializeDesktopHeaderConfigurationDefaults(Map desktopConfigMap,
                                                            HashMap namedResourcesDefault,
                                                            HashMap namedResourcesAddedFragmentsDefault,
                                                            HashMap headerDynamicConfigurationDefault)

initializeDojoHeaderConfigurationDefaults

protected void initializeDojoHeaderConfigurationDefaults(Map dojoConfigMap,
                                                         HashMap namedResourcesDefault,
                                                         HashMap namedResourcesAddedFragmentsDefault,
                                                         HashMap headerDynamicConfigurationDefault)
Read dojo header configuration settings and compile dojo header resource defaults


build

public void build(org.apache.jetspeed.request.RequestContext context)
           throws org.apache.jetspeed.exception.JetspeedException,
                  IOException
Builds the portlet set defined in the context into a portlet tree.

Specified by:
build in interface org.apache.jetspeed.aggregator.Aggregator
Throws:
org.apache.jetspeed.exception.JetspeedException
IOException

aggregateAndRender

protected boolean aggregateAndRender(org.apache.jetspeed.om.page.ContentFragment fragment,
                                     org.apache.jetspeed.request.RequestContext context,
                                     org.apache.jetspeed.om.page.ContentPage page)
                              throws org.apache.jetspeed.aggregator.FailedToRenderFragmentException
Throws:
org.apache.jetspeed.aggregator.FailedToRenderFragmentException

renderHeaderFragment

protected boolean renderHeaderFragment(org.apache.jetspeed.request.RequestContext context,
                                       org.apache.jetspeed.om.page.ContentFragment fragment)

getPortletFactory

protected org.apache.jetspeed.factory.PortletFactory getPortletFactory()

getPortletWindowAccessor

protected org.apache.jetspeed.container.window.PortletWindowAccessor getPortletWindowAccessor()

getHeaderResourceFactory

protected org.apache.jetspeed.headerresource.HeaderResourceFactory getHeaderResourceFactory()

isDesktop

protected boolean isDesktop()

getHeaderConfiguration

protected Map getHeaderConfiguration()

getHeaderResourceRegistry

protected Map getHeaderResourceRegistry()

getHeaderDynamicConfigurationDefault

protected Map getHeaderDynamicConfigurationDefault()

getHeaderNamedResourcesDefault

protected Map getHeaderNamedResourcesDefault()

getHeaderNamedResourcesAddedFragmentsDefault

protected Map getHeaderNamedResourcesAddedFragmentsDefault()

getBaseUrlAccess

protected org.apache.jetspeed.container.url.BasePortalURL getBaseUrlAccess()


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.