Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » portal » transformation » [javadoc | source]
org.apache.cocoon.portal.transformation
public class: EventLinkTransformer [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLProducer
         org.apache.cocoon.xml.AbstractXMLPipe
            org.apache.cocoon.transformation.AbstractTransformer
               org.apache.cocoon.transformation.AbstractSAXTransformer
                  org.apache.cocoon.portal.transformation.AbstractCopletTransformer
                     org.apache.cocoon.portal.transformation.EventLinkTransformer

All Implemented Interfaces:
    org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, Transformer, XMLPipe, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer

This transformer searches for event descriptions in the XML. For each one an event is created and the event link is inserted into the XML instead of the description.

Example:

<root xmlns:event="http://apache.org/cocoon/portal/eventlink/1.0">
<event:event attribute="href">
<a href="http://eventlinkexample"/>
</event:event>
<event:event element="uri">
<link><uri>http://eventlinkexample</uri></link>
</event:event>
</root>
The transformer will create two CopletLinkEvents and insert corresponding links to them to the XML instead of "http://eventlinkexample". If such a link is pressed the corresponding CopletLinkEvent is sent to the Subscribers to be handled.
Please see also the documentation of superclass AbstractCopletTransformer for how the coplet instance data are acquired.
Field Summary
public static final  String NAMESPACE_URI    The namespace URI to listen for. 
public static final  String EVENT_ELEM    The XML element name to listen for. 
public static final  String ATTRIBUTE_ATTR    An attribute's name of EVENT_ELEMENT. 
public static final  String ELEMENT_ATTR    An attribute's name of EVENT_ELEMENT. 
Fields inherited from org.apache.cocoon.portal.transformation.AbstractCopletTransformer:
COPLET_ID_PARAM,  portalService
Fields inherited from org.apache.cocoon.transformation.AbstractSAXTransformer:
EMPTY_ATTRIBUTES,  ignoreWhitespaces,  ignoreEmptyCharacters,  ignoreEventsCount,  ignoreHooksCount,  namespaceURI,  defaultNamespaceURI,  stack,  recorderStack,  request,  response,  context,  objectModel,  parameters,  source,  manager,  resolver,  emptyAttributes
Fields inherited from org.apache.cocoon.xml.AbstractXMLProducer:
EMPTY_CONTENT_HANDLER,  xmlConsumer,  contentHandler,  lexicalHandler
Method from org.apache.cocoon.portal.transformation.EventLinkTransformer Summary:
endElement,   recycle,   startElement
Methods from org.apache.cocoon.portal.transformation.AbstractCopletTransformer:
dispose,   getCopletInstanceData,   getCopletInstanceData,   getPortalService,   service
Methods from org.apache.cocoon.transformation.AbstractSAXTransformer:
addRecorder,   characters,   comment,   configure,   dispose,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endParametersRecording,   endParametersRecording,   endPrefixMapping,   endRecording,   endSAXRecording,   endSerializedXMLRecording,   endTextRecording,   endTransformingElement,   findPrefixMapping,   getMutableAttributes,   ignorableWhitespace,   processingInstruction,   recycle,   removeRecorder,   sendEndElementEvent,   sendEndElementEventNS,   sendEndPrefixMapping,   sendEvents,   sendParametersEvents,   sendStartElementEvent,   sendStartElementEvent,   sendStartElementEventNS,   sendStartElementEventNS,   sendStartPrefixMapping,   sendTextEvent,   service,   setDocumentLocator,   setup,   setupTransforming,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startParametersRecording,   startPrefixMapping,   startRecording,   startSAXRecording,   startSerializedXMLRecording,   startTextRecording,   startTransformingElement
Methods from org.apache.cocoon.xml.AbstractXMLPipe:
characters,   comment,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endPrefixMapping,   ignorableWhitespace,   processingInstruction,   setDocumentLocator,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startPrefixMapping
Methods from org.apache.cocoon.xml.AbstractXMLProducer:
recycle,   setConsumer,   setContentHandler,   setLexicalHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.portal.transformation.EventLinkTransformer Detail:
 public  void endElement(String uri,
    String name,
    String raw) throws SAXException 
    Overridden from superclass.
 public  void recycle() 
    Overridden from superclass.
 public  void startElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Overridden from superclass.