org.apache.cocoon.portal.coplet.adapter
Interface CopletAdapter

All Superinterfaces:
Component
All Known Implementing Classes:
AbstractCopletAdapter, ApplicationCopletAdapter, CachingURICopletAdapter, PortletAdapter, URICopletAdapter

public interface CopletAdapter
extends Component

This is the "portlet" implementation. A coplet adapter is the interface between the portal engine and the implementation of a coplet. Usually there is only one instance of an adapter (= singleton). Whenever an instance of this coplet is rendered, the adapter is invoked to render the coplet. The behaviour of the adapter can be controlled by a set of parameters. In general, the coplet base data defines the default for all coplets, but the value can be overriden by the coplet data. The coplet base data stores the information in the coplet config map whereas the coplet data stores them in the attributes. Apart from that the keys and the data types are the same. Configuration: buffer - A boolean value (default is false) that defines if the xml data stream from the coplet is buffered. If the stream is not buffered and an exception occurs then the whole portal will be rendered invalid. timeout - An integer value (default is endless) that defines the maximum time (in seconds) the coplet has to deliver it's content. If the timeout is reached the content is assumed as not gettable. If you set a timeout, the content is automatically buffered.

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

Field Summary
static String ROLE
           
 
Method Summary
 void destroy(CopletInstanceData coplet)
          Destroy the coplet This method is invoked when a coplet instance will be destroyed For each coplet, this method is only invoked once.
 void init(CopletInstanceData coplet)
          Initialize the coplet This method is called immediately after a new instance is created.
 void login(CopletInstanceData coplet)
          User logs in to a coplet This method is invoked when a user logs in for each coplet instance of the user
 void logout(CopletInstanceData coplet)
          User logs out from a coplet This method is invoked when a user logs out for each coplet instance of this user.
 void toSAX(CopletInstanceData coplet, ContentHandler contentHandler)
          Stream the content of the coplet
 

Field Detail

ROLE

static final String ROLE
Method Detail

init

void init(CopletInstanceData coplet)
Initialize the coplet This method is called immediately after a new instance is created. For each coplet, this method is only invoked once.

Parameters:
coplet - The coplet

destroy

void destroy(CopletInstanceData coplet)
Destroy the coplet This method is invoked when a coplet instance will be destroyed For each coplet, this method is only invoked once.

Parameters:
coplet -

toSAX

void toSAX(CopletInstanceData coplet,
           ContentHandler contentHandler)
           throws SAXException
Stream the content of the coplet

Throws:
SAXException

login

void login(CopletInstanceData coplet)
User logs in to a coplet This method is invoked when a user logs in for each coplet instance of the user


logout

void logout(CopletInstanceData coplet)
User logs out from a coplet This method is invoked when a user logs out for each coplet instance of this user.



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