org.apache.cocoon.portal.layout.renderer.aspect.impl
Class CompositeContentAspect

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
          extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractCompositeAspect
              extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.CompositeContentAspect
All Implemented Interfaces:
Component, LogEnabled, Serviceable, ThreadSafe, RendererAspect
Direct Known Subclasses:
TabContentAspect

public class CompositeContentAspect
extends AbstractCompositeAspect

Add several contents.

Example XML:

  <composite>
   <item param1="value1" param2="value2">
     <!-- included content from following renderers for this item's layout-->
   </item>
   <item>
     <!-- included content from following renderers for this item's layout-->
   </item>
   <item param1="value1">
     <!-- included content from following renderers for this item's layout-->
   </item>
  </composite>
 

Applicable to:

Parameters

root-tagEnclose result in root tag?booleantrue
tag-nameName of root tag to use.String"composite"
item-tagEnclose each item in item tag?booleantrue
item-tag-nameName of item tag to use.String"item"
root-tag-idValue of optional id attribute for the root tag.String-
root-tag-classValue of optional class attribute for the root tag.String-

Version:
CVS $Id:CompositeContentAspect.java 30932 2004-07-29 17:35:38Z vgritsenko $
Author:
Carsten Ziegeler, Volker Schmitt

Nested Class Summary
protected  class CompositeContentAspect.PreparedConfiguration
           
 
Field Summary
protected static String ITEM_STRING
           
 
Fields inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
manager
 
Fields inherited from interface org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect
ROLE
 
Constructor Summary
CompositeContentAspect()
           
 
Method Summary
 Object prepareConfiguration(Parameters configuration)
          Compile the configuration.
protected  void processItem(RendererAspectContext context, Item item, ContentHandler handler, PortalService service)
          Process a single layout element.
 void toSAX(RendererAspectContext context, Layout layout, PortalService service, ContentHandler handler)
          Stream out raw layout
 
Methods inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractCompositeAspect
processLayout
 
Methods inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
getAspectDescriptions, isRequired, service
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITEM_STRING

protected static final String ITEM_STRING
See Also:
Constant Field Values
Constructor Detail

CompositeContentAspect

public CompositeContentAspect()
Method Detail

toSAX

public void toSAX(RendererAspectContext context,
                  Layout layout,
                  PortalService service,
                  ContentHandler handler)
           throws SAXException
Description copied from interface: RendererAspect
Stream out raw layout

Specified by:
toSAX in interface RendererAspect
Overrides:
toSAX in class AbstractCompositeAspect
Throws:
SAXException
See Also:
AbstractCompositeAspect.toSAX(org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext, org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler)

processItem

protected void processItem(RendererAspectContext context,
                           Item item,
                           ContentHandler handler,
                           PortalService service)
                    throws SAXException
Description copied from class: AbstractCompositeAspect
Process a single layout element.

Specified by:
processItem in class AbstractCompositeAspect
item - layout item to be processed
handler - SAX handler taking events
service - portal service providing component access
Throws:
SAXException
See Also:
AbstractCompositeAspect.processItem(org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext, org.apache.cocoon.portal.layout.Item, org.xml.sax.ContentHandler, org.apache.cocoon.portal.PortalService)

prepareConfiguration

public Object prepareConfiguration(Parameters configuration)
                            throws ParameterException
Description copied from interface: RendererAspect
Compile the configuration. A renderer aspect can "compile" the configuration in order to increase performance. If the renderer does not want to compile it should simply return the configuration. The "compiled" configuration is passed to the RendererAspect.getAspectDescriptions(Object) method and is available during streaming via the context object. This method can also be used for validation the configuration.

Specified by:
prepareConfiguration in interface RendererAspect
Overrides:
prepareConfiguration in class AbstractAspect
Throws:
ParameterException
See Also:
RendererAspect.prepareConfiguration(org.apache.avalon.framework.parameters.Parameters)


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