org.apache.wsrp4j.consumer.app.driver
Class PortletRegistryImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.GenericPortletRegistryImpl
      extended byorg.apache.wsrp4j.consumer.app.driver.PortletRegistryImpl
All Implemented Interfaces:
PortletRegistry, StateChangedListener

public class PortletRegistryImpl
extends GenericPortletRegistryImpl
implements StateChangedListener

This class is the PortletRegistry implementation used by the swing consumer to administer, store, load and manage portlets.

Version:
$Id: PortletRegistryImpl.java,v 1.4 2005/08/10 14:45:38 cziegeler Exp $
Author:
Stephan Laertz
See Also:
GenericPortletRegistryImpl

Field Summary
private  java.util.Hashtable contextMap
           
private static PortletRegistry instance
           
private  Logger logger
           
private  PersistentDataObject persistentDataObject
           
private  PersistentDataObject persistentDataObjectContext
           
private  PersistentHandler persistentHandler
           
 
Fields inherited from class org.apache.wsrp4j.consumer.driver.GenericPortletRegistryImpl
 
Constructor Summary
private PortletRegistryImpl()
           
 
Method Summary
 void addPortlet(WSRPPortlet portlet)
          Add a portlet to the registry
private  void delete(PersistentDataObject persistentDataObject)
          Delete the input PersistentDataObject from the persistent store
(package private) static PortletRegistry getInstance()
          Get a reference to the singleton of this class.
 void removeAllPortlets()
          Remove all portlets from the registry and delete them in the persistent store.
 WSRPPortlet removePortlet(PortletKey portletKey)
          Remove the portlet with the given portlet key
private  void restore()
          Restores all available portlets from persistent file store
 void stateChanged(StateChangedEvent event)
          StateChanged Event occured by a registered WSRPPortlet.
private  void store(PersistentDataObject persistentDataObject)
          Store the input PersistentDataObject to the persistent store
 
Methods inherited from class org.apache.wsrp4j.consumer.driver.GenericPortletRegistryImpl
existsPortlet, getAllPortlets, getPortlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private Logger logger

instance

private static PortletRegistry instance

contextMap

private java.util.Hashtable contextMap

persistentDataObject

private PersistentDataObject persistentDataObject

persistentDataObjectContext

private PersistentDataObject persistentDataObjectContext

persistentHandler

private PersistentHandler persistentHandler
Constructor Detail

PortletRegistryImpl

private PortletRegistryImpl()
Method Detail

getInstance

static PortletRegistry getInstance()
Get a reference to the singleton of this class.

Returns:
A reference to this PortletRegistryImpl

addPortlet

public void addPortlet(WSRPPortlet portlet)
                throws WSRPException
Add a portlet to the registry

Specified by:
addPortlet in interface PortletRegistry
Overrides:
addPortlet in class GenericPortletRegistryImpl
Parameters:
portlet - The portlet to add
Throws:
WSRPException - on error

removePortlet

public WSRPPortlet removePortlet(PortletKey portletKey)
Remove the portlet with the given portlet key

Specified by:
removePortlet in interface PortletRegistry
Overrides:
removePortlet in class GenericPortletRegistryImpl
Parameters:
portletKey - The portlet key identifying the portlet
Returns:
returns the removed instance of WSRPPortlet

removeAllPortlets

public void removeAllPortlets()
Remove all portlets from the registry and delete them in the persistent store.

Specified by:
removeAllPortlets in interface PortletRegistry
Overrides:
removeAllPortlets in class GenericPortletRegistryImpl

stateChanged

public void stateChanged(StateChangedEvent event)
StateChanged Event occured by a registered WSRPPortlet. The input source object, contained in the event will be updated in the persistence store.

Specified by:
stateChanged in interface StateChangedListener
Parameters:
event -
See Also:
StateChangedEvent

restore

private void restore()
              throws WSRPException
Restores all available portlets from persistent file store

Throws:
WSRPException

store

private void store(PersistentDataObject persistentDataObject)
            throws WSRPException
Store the input PersistentDataObject to the persistent store

Parameters:
persistentDataObject -
Throws:
WSRPException

delete

private void delete(PersistentDataObject persistentDataObject)
Delete the input PersistentDataObject from the persistent store



--