org.apache.jetspeed.aggregator.impl
Class HeaderAggregatorImpl

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

public class HeaderAggregatorImpl
extends java.lang.Object
implements 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
protected static java.lang.String EOL
           
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
HeaderAggregatorImpl(PortletFactory factory, PortletWindowAccessor windowAccessor, HeaderResourceFactory headerResourceFactory, boolean isDesktop, java.util.Map headerConfiguration, java.util.Map headerResourceRegistry, DecorationFactory decorationFactory)
           
HeaderAggregatorImpl(PortletFactory factory, PortletWindowAccessor windowAccessor, HeaderResourceFactory headerResourceFactory, boolean isDesktop, java.util.Map headerConfiguration, java.util.Map headerResourceRegistry, DecorationFactory decorationFactory, BasePortalURL baseUrlAccess)
           
 
Method Summary
protected  boolean aggregateAndRender(ContentFragment fragment, RequestContext context, ContentPage page)
           
 void build(RequestContext context)
          Builds the portlet set defined in the context into a portlet tree.
protected  boolean canAddHeaderNamedResourceFragment(java.lang.String headerFragmentName, java.util.HashMap namedResourcesAddedFragmentsDefault, java.lang.String[] registryContent)
           
protected  BasePortalURL getBaseUrlAccess()
           
protected  java.util.Map getHeaderConfiguration()
           
protected  java.util.Map getHeaderDynamicConfigurationDefault()
           
protected  java.util.Map getHeaderNamedResourcesAddedFragmentsDefault()
           
protected  java.util.Map getHeaderNamedResourcesDefault()
           
protected  HeaderResourceFactory getHeaderResourceFactory()
           
protected  java.util.Map getHeaderResourceRegistry()
           
protected  PortletFactory getPortletFactory()
           
protected  PortletWindowAccessor getPortletWindowAccessor()
           
protected  void initializeDesktopHeaderConfigurationDefaults(java.util.Map desktopConfigMap, java.util.HashMap namedResourcesDefault, java.util.HashMap namedResourcesAddedFragmentsDefault, java.util.HashMap headerDynamicConfigurationDefault)
           
protected  void initializeDojoHeaderConfigurationDefaults(java.util.Map dojoConfigMap, java.util.HashMap namedResourcesDefault, java.util.HashMap namedResourcesAddedFragmentsDefault, java.util.HashMap headerDynamicConfigurationDefault)
          Read dojo header configuration settings and compile dojo header resource defaults
protected  java.util.Map initializeHeaderConfigurationDefaults(java.util.HashMap namedResourcesDefault, java.util.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(java.lang.Object headerConfigKey, java.lang.Object headerConfigValue, java.util.HashMap namedResourcesDefault, java.util.HashMap namedResourcesAddedFragmentsDefault, java.util.HashMap headerDynamicConfigurationDefault)
          Intended as derived class hook into header configuration process
protected  void initializeHeaderOrderConfigurationDefaults(java.util.HashMap namedResourcesDefault, java.util.HashMap namedResourcesAddedFragmentsDefault, java.util.HashMap headerDynamicConfigurationDefault)
           
protected  void initializeMissingHeaderConfigurationEntryDefaults(java.util.HashMap namedResourcesDefault, java.util.HashMap namedResourcesAddedFragmentsDefault, java.util.HashMap headerDynamicConfigurationDefault)
           
protected  boolean isDesktop()
           
protected  void orderNamedHeaderResource(java.lang.String headerName, java.util.Map headerDynamicConfigurationDefault)
           
protected  void postinitializeHeaderOrderConfigurationDefaults(java.util.HashMap headerDynamicConfigurationDefault)
           
protected  void registerAndOrderNamedHeaderResource(java.lang.String headerName, java.lang.String headerType, java.lang.String headerReqFlag, java.util.Map headerDynamicConfigurationDefault)
           
protected  boolean renderHeaderFragment(RequestContext context, ContentFragment fragment)
           
protected  void setNamedHeaderResourceProperties(java.lang.String headerName, java.lang.String headerType, java.lang.String headerReqFlag, java.util.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 java.lang.String EOL
See Also:
Constant Field Values
Constructor Detail

HeaderAggregatorImpl

public HeaderAggregatorImpl(PortletFactory factory,
                            PortletWindowAccessor windowAccessor,
                            HeaderResourceFactory headerResourceFactory,
                            boolean isDesktop,
                            java.util.Map headerConfiguration,
                            java.util.Map headerResourceRegistry,
                            DecorationFactory decorationFactory)

HeaderAggregatorImpl

public HeaderAggregatorImpl(PortletFactory factory,
                            PortletWindowAccessor windowAccessor,
                            HeaderResourceFactory headerResourceFactory,
                            boolean isDesktop,
                            java.util.Map headerConfiguration,
                            java.util.Map headerResourceRegistry,
                            DecorationFactory decorationFactory,
                            BasePortalURL baseUrlAccess)
Method Detail

initializeHeaderConfigurationDefaults

protected java.util.Map initializeHeaderConfigurationDefaults(java.util.HashMap namedResourcesDefault,
                                                              java.util.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(java.util.HashMap namedResourcesDefault,
                                                          java.util.HashMap namedResourcesAddedFragmentsDefault,
                                                          java.util.HashMap headerDynamicConfigurationDefault)

postinitializeHeaderOrderConfigurationDefaults

protected void postinitializeHeaderOrderConfigurationDefaults(java.util.HashMap headerDynamicConfigurationDefault)

initializeHeaderConfigurationEntryDefaults

protected boolean initializeHeaderConfigurationEntryDefaults(java.lang.Object headerConfigKey,
                                                             java.lang.Object headerConfigValue,
                                                             java.util.HashMap namedResourcesDefault,
                                                             java.util.HashMap namedResourcesAddedFragmentsDefault,
                                                             java.util.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(java.util.HashMap namedResourcesDefault,
                                                                 java.util.HashMap namedResourcesAddedFragmentsDefault,
                                                                 java.util.HashMap headerDynamicConfigurationDefault)

registerAndOrderNamedHeaderResource

protected void registerAndOrderNamedHeaderResource(java.lang.String headerName,
                                                   java.lang.String headerType,
                                                   java.lang.String headerReqFlag,
                                                   java.util.Map headerDynamicConfigurationDefault)

orderNamedHeaderResource

protected void orderNamedHeaderResource(java.lang.String headerName,
                                        java.util.Map headerDynamicConfigurationDefault)

setNamedHeaderResourceProperties

protected void setNamedHeaderResourceProperties(java.lang.String headerName,
                                                java.lang.String headerType,
                                                java.lang.String headerReqFlag,
                                                java.util.Map headerDynamicConfigurationDefault)

canAddHeaderNamedResourceFragment

protected boolean canAddHeaderNamedResourceFragment(java.lang.String headerFragmentName,
                                                    java.util.HashMap namedResourcesAddedFragmentsDefault,
                                                    java.lang.String[] registryContent)

initializeDesktopHeaderConfigurationDefaults

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

initializeDojoHeaderConfigurationDefaults

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


build

public void build(RequestContext context)
           throws JetspeedException,
                  java.io.IOException
Builds the portlet set defined in the context into a portlet tree.

Specified by:
build in interface Aggregator
Throws:
JetspeedException
java.io.IOException

aggregateAndRender

protected boolean aggregateAndRender(ContentFragment fragment,
                                     RequestContext context,
                                     ContentPage page)
                              throws FailedToRenderFragmentException
Throws:
FailedToRenderFragmentException

renderHeaderFragment

protected boolean renderHeaderFragment(RequestContext context,
                                       ContentFragment fragment)

getPortletFactory

protected PortletFactory getPortletFactory()

getPortletWindowAccessor

protected PortletWindowAccessor getPortletWindowAccessor()

getHeaderResourceFactory

protected HeaderResourceFactory getHeaderResourceFactory()

isDesktop

protected boolean isDesktop()

getHeaderConfiguration

protected java.util.Map getHeaderConfiguration()

getHeaderResourceRegistry

protected java.util.Map getHeaderResourceRegistry()

getHeaderDynamicConfigurationDefault

protected java.util.Map getHeaderDynamicConfigurationDefault()

getHeaderNamedResourcesDefault

protected java.util.Map getHeaderNamedResourcesDefault()

getHeaderNamedResourcesAddedFragmentsDefault

protected java.util.Map getHeaderNamedResourcesAddedFragmentsDefault()

getBaseUrlAccess

protected BasePortalURL getBaseUrlAccess()


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