org.apache.cocoon.portal.coplet.adapter.impl
Class URICopletAdapter

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter
          extended by org.apache.cocoon.portal.coplet.adapter.impl.URICopletAdapter
All Implemented Interfaces:
Disposable, Initializable, Component, Contextualizable, LogEnabled, Serviceable, ThreadSafe, CopletAdapter, Receiver
Direct Known Subclasses:
CachingURICopletAdapter

public class URICopletAdapter
extends AbstractCopletAdapter
implements Disposable, Receiver, Initializable, Contextualizable

This is the adapter to use pipelines as coplets

Version:
CVS $Id: URICopletAdapter.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt

Field Summary
protected  Context context
          The application context
protected  SourceResolver resolver
          The source resolver
 
Fields inherited from class org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter
manager
 
Fields inherited from interface org.apache.cocoon.portal.coplet.adapter.CopletAdapter
ROLE
 
Constructor Summary
URICopletAdapter()
           
 
Method Summary
 void contextualize(Context context)
           
 void dispose()
           
 void inform(CopletInstanceEvent event, PortalService service)
           
 void initialize()
           
protected  boolean renderErrorContent(CopletInstanceData coplet, ContentHandler handler, Exception error)
          Render the error content for a coplet
 void service(ServiceManager manager)
           
 void streamContent(CopletInstanceData coplet, ContentHandler contentHandler)
          Implement this and not toSAX()
 void streamContent(CopletInstanceData coplet, String uri, ContentHandler contentHandler)
           
 
Methods inherited from class org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter
destroy, getConfiguration, getConfiguration, init, login, logout, toSAX
 
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

resolver

protected SourceResolver resolver
The source resolver


context

protected Context context
The application context

Constructor Detail

URICopletAdapter

public URICopletAdapter()
Method Detail

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Overrides:
service in class AbstractCopletAdapter
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

streamContent

public void streamContent(CopletInstanceData coplet,
                          ContentHandler contentHandler)
                   throws SAXException
Description copied from class: AbstractCopletAdapter
Implement this and not toSAX()

Specified by:
streamContent in class AbstractCopletAdapter
Throws:
SAXException
See Also:
AbstractCopletAdapter.streamContent(org.apache.cocoon.portal.coplet.CopletInstanceData, org.xml.sax.ContentHandler)

streamContent

public void streamContent(CopletInstanceData coplet,
                          String uri,
                          ContentHandler contentHandler)
                   throws SAXException
Throws:
SAXException

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

inform

public void inform(CopletInstanceEvent event,
                   PortalService service)
See Also:
Receiver

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception
See Also:
Initializable.initialize()

renderErrorContent

protected boolean renderErrorContent(CopletInstanceData coplet,
                                     ContentHandler handler,
                                     Exception error)
                              throws SAXException
Render the error content for a coplet

Overrides:
renderErrorContent in class AbstractCopletAdapter
Parameters:
coplet - The coplet instance data
handler - The content handler
error - The exception that occured
Returns:
True if the error content has been rendered, otherwise false
Throws:
SAXException


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