org.apache.cocoon.woody.transformation
Class EffectWidgetReplacingPipe

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.xml.AbstractXMLPipe
              extended by org.apache.cocoon.woody.transformation.EffectPipe
                  extended by org.apache.cocoon.woody.transformation.EffectWidgetReplacingPipe
All Implemented Interfaces:
Poolable, Recyclable, LogEnabled, XMLPipe, XMLProducer, XMLConsumer, ContentHandler, LexicalHandler
Direct Known Subclasses:
WoodyTemplateTransformer

public class EffectWidgetReplacingPipe
extends EffectPipe

The basic operation of this Pipe is that it replaces wt:widget (in the Constants.WT_NS namespace) tags (having an id attribute) by the XML representation of the corresponding widget instance.

These XML fragments (normally all in the "Woody Instance" namespace), can then be translated to a HTML presentation by an XSL. This XSL will then only have to style individual widget, and will not need to do the whole page layout.

For more information about the supported tags and their function, see the user documentation for the woody template transformer.

Version:
CVS $Id: EffectWidgetReplacingPipe.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Timothy Larson

Nested Class Summary
protected  class EffectWidgetReplacingPipe.AggregateWidgetHandler
           
protected  class EffectWidgetReplacingPipe.ClassHandler
           
protected  class EffectWidgetReplacingPipe.ContinuationIdHandler
           
protected  class EffectWidgetReplacingPipe.DocHandler
           
protected  class EffectWidgetReplacingPipe.FormHandler
           
protected  class EffectWidgetReplacingPipe.NestedHandler
           
protected  class EffectWidgetReplacingPipe.NewHandler
           
protected  class EffectWidgetReplacingPipe.RepeaterSizeHandler
           
protected  class EffectWidgetReplacingPipe.RepeaterWidgetHandler
           
protected  class EffectWidgetReplacingPipe.RepeaterWidgetLabelHandler
           
protected  class EffectWidgetReplacingPipe.StructHandler
           
protected  class EffectWidgetReplacingPipe.StylingContentHandler
          This ContentHandler helps in inserting SAX events before the closing tag of the root element.
protected  class EffectWidgetReplacingPipe.UnionHandler
           
protected  class EffectWidgetReplacingPipe.UnionPassThruHandler
           
protected  class EffectWidgetReplacingPipe.ValidationErrorHandler
          Inserts validation errors (if any) for the Field widgets
protected  class EffectWidgetReplacingPipe.WidgetHandler
           
protected  class EffectWidgetReplacingPipe.WidgetLabelHandler
           
 
Nested classes/interfaces inherited from class org.apache.cocoon.woody.transformation.EffectPipe
EffectPipe.BufferHandler, EffectPipe.Element, EffectPipe.Handler, EffectPipe.NullHandler, EffectPipe.Output
 
Field Summary
protected  Map classes
           
protected  Widget contextWidget
           
protected  LinkedList contextWidgets
           
protected  boolean gotStylingElement
          Have we encountered a element in a widget ?
protected  String namespacePrefix
          Namespace prefix used for the namespace Constants.WT_NS.
protected  WoodyPipelineConfig pipeContext
           
protected  Widget widget
           
protected  String widgetId
           
 
Fields inherited from class org.apache.cocoon.woody.transformation.EffectPipe
bufferHandler, c, data, elements, event, EVENT_CHARACTERS, EVENT_COMMENT, EVENT_ELEMENT, EVENT_END_CDATA, EVENT_END_DOCUMENT, EVENT_END_DTD, EVENT_END_ELEMENT, EVENT_END_ENTITY, EVENT_END_PREFIX_MAPPING, EVENT_IGNORABLE_WHITESPACE, EVENT_PROCESSING_INSTRUCTION, EVENT_SET_DOCUMENT_LOCATOR, EVENT_SKIPPED_ENTITY, EVENT_START_CDATA, EVENT_START_DOCUMENT, EVENT_START_DTD, EVENT_START_ELEMENT, EVENT_START_ENTITY, EVENT_START_PREFIX_MAPPING, handler, handlers, input, len, locator, name, nullHandler, out, prefix, publicId, start, systemId, target, uri
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Constructor Summary
EffectWidgetReplacingPipe()
           
 
Method Summary
protected  void getRepeaterWidget(String handler)
           
protected  Widget getWidget(String widgetId)
           
protected  String getWidgetId(Attributes attributes)
           
 void init(Widget contextWidget, WoodyPipelineConfig pipeContext)
           
 EffectPipe.Handler nestedTemplate()
           
 void recycle()
          Recycle the producer by removing references, and resetting handlers to null (empty) implementations.
 void throwWrongWidgetType(String pipeName, String element, String widget)
           
 
Methods inherited from class org.apache.cocoon.woody.transformation.EffectPipe
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, init, processingInstruction, setConsumer, setContentHandler, setDocumentLocator, setLexicalHandler, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
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

contextWidget

protected Widget contextWidget

contextWidgets

protected LinkedList contextWidgets

widgetId

protected String widgetId

widget

protected Widget widget

classes

protected Map classes

pipeContext

protected WoodyPipelineConfig pipeContext

gotStylingElement

protected boolean gotStylingElement
Have we encountered a element in a widget ?


namespacePrefix

protected String namespacePrefix
Namespace prefix used for the namespace Constants.WT_NS.

Constructor Detail

EffectWidgetReplacingPipe

public EffectWidgetReplacingPipe()
Method Detail

init

public void init(Widget contextWidget,
                 WoodyPipelineConfig pipeContext)

getWidgetId

protected String getWidgetId(Attributes attributes)
                      throws SAXException
Throws:
SAXException

getWidget

protected Widget getWidget(String widgetId)
                    throws SAXException
Throws:
SAXException

getRepeaterWidget

protected void getRepeaterWidget(String handler)
                          throws SAXException
Throws:
SAXException

throwWrongWidgetType

public void throwWrongWidgetType(String pipeName,
                                 String element,
                                 String widget)
                          throws SAXException
Throws:
SAXException

nestedTemplate

public EffectPipe.Handler nestedTemplate()
                                  throws SAXException
Throws:
SAXException

recycle

public void recycle()
Description copied from class: AbstractXMLProducer
Recycle the producer by removing references, and resetting handlers to null (empty) implementations.

Specified by:
recycle in interface Recyclable
Overrides:
recycle in class EffectPipe


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