org.apache.cocoon.portal.pluto.adapter
Class PortletAdapter

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.portal.impl.AbstractComponent
          extended byorg.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter
              extended byorg.apache.cocoon.portal.pluto.adapter.PortletAdapter
All Implemented Interfaces:
Contextualizable, CopletAdapter, Disposable, Initializable, LogEnabled, PortalManagerAspect, Preloadable, Receiver, Serviceable, ThreadSafe

public class PortletAdapter
extends AbstractCopletAdapter
implements Contextualizable, Initializable, PortalManagerAspect, Receiver, Disposable

This is the adapter to use JSR-168 portlets as coplets.

Version:
$Id: PortletAdapter.java 326047 2005-10-18 07:56:18Z cziegeler $

Field Summary
protected  Context context
          The avalon context.
protected  org.apache.pluto.PortletContainer portletContainer
          The Portlet Container.
protected  PortletContainerEnvironmentImpl portletContainerEnvironment
          The Portlet Container environment.
protected  ServletConfig servletConfig
          The servlet configuration for pluto.
 
Fields inherited from class org.apache.cocoon.portal.impl.AbstractComponent
manager, portalService
 
Fields inherited from interface org.apache.cocoon.portal.PortalManagerAspect
ROLE
 
Fields inherited from interface org.apache.cocoon.portal.coplet.adapter.CopletAdapter
ROLE
 
Constructor Summary
PortletAdapter()
           
 
Method Summary
 void contextualize(Context context)
           
 void dispose()
           
 org.apache.pluto.PortletContainer getPortletContainer()
          Return the portlet container
 org.apache.pluto.services.PortletContainerEnvironment getPortletContainerEnvironment()
          Return the portlet container environment
 void inform(PortletURLProviderImpl event, PortalService service)
           
 void initContainer()
          Initialize the container
 void initialize()
           
 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 prepare(PortalManagerAspectPrepareContext aspectContext, PortalService service)
           
 void render(PortalManagerAspectRenderContext aspectContext, PortalService service, ContentHandler ch, Parameters parameters)
           
 void service(ServiceManager manager)
           
 void streamContent(CopletInstanceData coplet, ContentHandler contentHandler)
          Implement this and not toSAX()
 
Methods inherited from class org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter
destroy, getConfiguration, getConfiguration, init, renderErrorContent, 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

context

protected Context context
The avalon context.


servletConfig

protected ServletConfig servletConfig
The servlet configuration for pluto.


portletContainer

protected org.apache.pluto.PortletContainer portletContainer
The Portlet Container.


portletContainerEnvironment

protected PortletContainerEnvironmentImpl portletContainerEnvironment
The Portlet Container environment.

Constructor Detail

PortletAdapter

public PortletAdapter()
Method Detail

contextualize

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

login

public void login(CopletInstanceData coplet)
Description copied from interface: CopletAdapter
User logs in to a coplet This method is invoked when a user logs in for each coplet instance of the user

Specified by:
login in interface CopletAdapter
Overrides:
login in class AbstractCopletAdapter
See Also:
CopletAdapter.login(org.apache.cocoon.portal.coplet.CopletInstanceData)

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)

logout

public void logout(CopletInstanceData coplet)
Description copied from interface: CopletAdapter
User logs out from a coplet This method is invoked when a user logs out for each coplet instance of this user.

Specified by:
logout in interface CopletAdapter
Overrides:
logout in class AbstractCopletAdapter
See Also:
CopletAdapter.logout(org.apache.cocoon.portal.coplet.CopletInstanceData)

service

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

dispose

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

initialize

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

getPortletContainer

public org.apache.pluto.PortletContainer getPortletContainer()
Return the portlet container


getPortletContainerEnvironment

public org.apache.pluto.services.PortletContainerEnvironment getPortletContainerEnvironment()
Return the portlet container environment


initContainer

public void initContainer()
                   throws Exception
Initialize the container

Throws:
Exception

inform

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

prepare

public void prepare(PortalManagerAspectPrepareContext aspectContext,
                    PortalService service)
             throws ProcessingException
Specified by:
prepare in interface PortalManagerAspect
Throws:
ProcessingException
See Also:
PortalManagerAspect.prepare(org.apache.cocoon.portal.PortalManagerAspectPrepareContext, org.apache.cocoon.portal.PortalService)

render

public void render(PortalManagerAspectRenderContext aspectContext,
                   PortalService service,
                   ContentHandler ch,
                   Parameters parameters)
            throws SAXException
Specified by:
render in interface PortalManagerAspect
Throws:
SAXException
See Also:
PortalManagerAspect.render(org.apache.cocoon.portal.PortalManagerAspectRenderContext, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler, org.apache.avalon.framework.parameters.Parameters)


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.