org.apache.cocoon.portal.wsrp.consumer
Class PortletDriverRegistryImpl

java.lang.Object
  extended byorg.apache.cocoon.portal.wsrp.consumer.PortletDriverRegistryImpl
All Implemented Interfaces:
org.apache.wsrp4j.consumer.PortletDriverRegistry, RequiresConsumerEnvironment, RequiresWSRPAdapter

public class PortletDriverRegistryImpl
extends Object
implements org.apache.wsrp4j.consumer.PortletDriverRegistry, RequiresConsumerEnvironment, RequiresWSRPAdapter

Manages the drivers for the portlets the consumerEnvironment holds
Per portlet one portletDriver will be stored

Version:
$Id: PortletDriverRegistryImpl.java 322475 2005-10-16 14:26:44Z cziegeler $

Field Summary
protected  WSRPAdapter adapter
          The WSRP adapter.
protected  org.apache.wsrp4j.consumer.ConsumerEnvironment consumerEnv
          The consumer environment.
protected  Hashtable portletDrivers
          All portletDrivers the consumerEnvironment needs.
 
Constructor Summary
PortletDriverRegistryImpl()
           
 
Method Summary
 Iterator getAllPortletDrivers()
          Get all cached portlet drivers.
 org.apache.wsrp4j.consumer.PortletDriver getPortletDriver(org.apache.wsrp4j.consumer.WSRPPortlet portlet)
          Get an portlet driver for the given portlet.
 void setConsumerEnvironment(org.apache.wsrp4j.consumer.ConsumerEnvironment env)
           
 void setWSRPAdapter(WSRPAdapter adapter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portletDrivers

protected final Hashtable portletDrivers
All portletDrivers the consumerEnvironment needs.


consumerEnv

protected org.apache.wsrp4j.consumer.ConsumerEnvironment consumerEnv
The consumer environment.


adapter

protected WSRPAdapter adapter
The WSRP adapter.

Constructor Detail

PortletDriverRegistryImpl

public PortletDriverRegistryImpl()
Method Detail

setConsumerEnvironment

public void setConsumerEnvironment(org.apache.wsrp4j.consumer.ConsumerEnvironment env)
Specified by:
setConsumerEnvironment in interface RequiresConsumerEnvironment
See Also:
RequiresConsumerEnvironment.setConsumerEnvironment(org.apache.wsrp4j.consumer.ConsumerEnvironment)

setWSRPAdapter

public void setWSRPAdapter(WSRPAdapter adapter)
Specified by:
setWSRPAdapter in interface RequiresWSRPAdapter
See Also:
RequiresWSRPAdapter.setWSRPAdapter(org.apache.cocoon.portal.wsrp.adapter.WSRPAdapter)

getPortletDriver

public org.apache.wsrp4j.consumer.PortletDriver getPortletDriver(org.apache.wsrp4j.consumer.WSRPPortlet portlet)
                                                          throws org.apache.wsrp4j.exception.WSRPException
Get an portlet driver for the given portlet. If there is no portlet driver object cached a new portlet driver will be created and returned.

Specified by:
getPortletDriver in interface org.apache.wsrp4j.consumer.PortletDriverRegistry
Parameters:
portlet - The portlet the returned portlet driver is bound to.
Returns:
The portlet driver for this portlet.
Throws:
org.apache.wsrp4j.exception.WSRPException

getAllPortletDrivers

public Iterator getAllPortletDrivers()
Get all cached portlet drivers.

Specified by:
getAllPortletDrivers in interface org.apache.wsrp4j.consumer.PortletDriverRegistry
Returns:
Iterator with all portlet drivers in the registry.


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