Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » portal » transformation » [javadoc | source]
org.apache.cocoon.portal.transformation
abstract public class: AbstractCopletTransformer [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

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

Direct Known Subclasses:
    NewEventLinkTransformer, EventLinkTransformer, CopletTransformer, HTMLEventLinkTransformer

Abstract transformer implementation that provides some useful methods and functionality. The portal service is stored in the instance variable #portalService and can be used. There are some methods to fetch a coplet instance data. #getCopletInstanceData() tries to get the instance associated with the current request and #getCopletInstanceData(String) fetches an instance with a given id. If you want to get the coplet instance data associated with the current request, there are three possibilities how the transformer obtains the information required for getting the coplet instance data - or more precisly its id:

1) If it is used within a coplet pipeline and this pipeline is called using the "cocoon:" protocol, all required information is passed automatically.
2) The id can be passed to the transformer as sitemap paremeters in the following way:
<map:transform type="coplet">
<map:parameter name="copletId" type="examplecoplet"/>
</map:transform>
3) Any component can set the id as a string in the object model of the current request. This is the name of the key to be used: org.apache.cocoon.portal.Constants#COPLET_ID_KEY .
Field Summary
public static final  String COPLET_ID_PARAM    Parameter name for the coplet id. 
protected  PortalService portalService    The portal service. @since 2.1.8 
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.AbstractCopletTransformer Summary:
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.AbstractCopletTransformer Detail:
 public  void dispose() 
 protected CopletInstanceData getCopletInstanceData() throws SAXException 
    Try to get the coplet instance data belonging to the current request
 protected CopletInstanceData getCopletInstanceData(String copletId) throws SAXException 
    Try to get the coplet instance data with the given id
 protected PortalService getPortalService() throws SAXException 
Deprecated! Use - directly the instance variable.

    Get the portal service.
 public  void service(ServiceManager manager) throws ServiceException