org.apache.jetspeed.om.registry.base
Class BasePortletRegistry

java.lang.Object
  extended byorg.apache.jetspeed.om.registry.base.BaseRegistry
      extended byorg.apache.jetspeed.om.registry.base.BasePortletRegistry
All Implemented Interfaces:
LocalRegistry, PortletRegistry, Registry

public class BasePortletRegistry
extends BaseRegistry
implements PortletRegistry

Provides base functionality within a Portlet Registry.

To avoid loops, a RegistryService implementation using this class nees to call the addLocalEntry/removeLocalEntry methods to modify the in memory state of this Registry

Version:
$Id: BasePortletRegistry.java,v 1.7 2004/02/23 03:08:26 jford Exp $
Author:
David Sean Taylor

Field Summary
 
Fields inherited from class org.apache.jetspeed.om.registry.base.BaseRegistry
DEBUG, entries
 
Constructor Summary
BasePortletRegistry()
           
 
Method Summary
 void addEntry(RegistryEntry entry)
          Add the given entry to the registry with the given name.
 void addLocalEntry(RegistryEntry entry)
          This method is used to only add the entry in the local memory cache of the registry without any coherency check with persistent storage
 RegistryEntry createEntry()
          Creates a new RegistryEntry instance compatible with the current Registry instance implementation
 java.util.Iterator findPortletsByCategory(java.lang.String category)
           
 java.util.Iterator findPortletsByGroupCategory(java.lang.String group, java.lang.String category)
           
 java.lang.String getCategoryKey(Category category)
           
 java.util.Iterator listByCategory()
           
 void removeEntry(RegistryEntry entry)
          Removes the given entry from the Registry
 void removeEntry(java.lang.String name)
          Removes the given entry from the Registry
 void removeLocalEntry(RegistryEntry entry)
          This method is used to only remove the entry from the local memory cache of the registry without any coherency check with persistent storage
 void removeLocalEntry(java.lang.String name)
          This method is used to only remove the entry from the local memory cache of the registry without any coherency check with persistent storage
 void setEntry(RegistryEntry entry)
          Set the entry in the registry with the specified name and Entry
 void setLocalEntry(RegistryEntry entry)
          This method is used to only set the entry in the local memory cache of the registry without any coherency check with persistent storage
protected  void setPortletEntry(PortletEntry entry)
           
 
Methods inherited from class org.apache.jetspeed.om.registry.base.BaseRegistry
getEntries, getEntry, getEntryCount, hasEntry, listEntryNames, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.om.registry.Registry
getEntries, getEntry, getEntryCount, hasEntry, listEntryNames, toArray
 

Constructor Detail

BasePortletRegistry

public BasePortletRegistry()
Method Detail

setEntry

public void setEntry(RegistryEntry entry)
              throws InvalidEntryException
Description copied from interface: Registry
Set the entry in the registry with the specified name and Entry

Specified by:
setEntry in interface Registry
Overrides:
setEntry in class BaseRegistry
Throws:
InvalidEntryException
See Also:
Registry#setEntry

addEntry

public void addEntry(RegistryEntry entry)
              throws InvalidEntryException
Description copied from interface: Registry
Add the given entry to the registry with the given name.

Specified by:
addEntry in interface Registry
Overrides:
addEntry in class BaseRegistry
Throws:
InvalidEntryException
See Also:
Registry.addEntry(java.lang.String, org.apache.jetspeed.om.registry.RegistryEntry)

removeEntry

public void removeEntry(java.lang.String name)
Description copied from interface: Registry
Removes the given entry from the Registry

Specified by:
removeEntry in interface Registry
Overrides:
removeEntry in class BaseRegistry
See Also:
Registry.removeEntry(java.lang.String, java.lang.String)

removeEntry

public void removeEntry(RegistryEntry entry)
Description copied from interface: Registry
Removes the given entry from the Registry

Specified by:
removeEntry in interface Registry
Overrides:
removeEntry in class BaseRegistry
See Also:
Registry.removeEntry(java.lang.String, java.lang.String)

setPortletEntry

protected void setPortletEntry(PortletEntry entry)
                        throws InvalidEntryException
Throws:
InvalidEntryException

getCategoryKey

public java.lang.String getCategoryKey(Category category)
Specified by:
getCategoryKey in interface PortletRegistry

findPortletsByCategory

public java.util.Iterator findPortletsByCategory(java.lang.String category)
Specified by:
findPortletsByCategory in interface PortletRegistry

findPortletsByGroupCategory

public java.util.Iterator findPortletsByGroupCategory(java.lang.String group,
                                                      java.lang.String category)
Specified by:
findPortletsByGroupCategory in interface PortletRegistry

listByCategory

public java.util.Iterator listByCategory()
Specified by:
listByCategory in interface PortletRegistry

createEntry

public RegistryEntry createEntry()
Creates a new RegistryEntry instance compatible with the current Registry instance implementation

Specified by:
createEntry in interface Registry
Overrides:
createEntry in class BaseRegistry
Returns:
the newly created RegistryEntry

setLocalEntry

public void setLocalEntry(RegistryEntry entry)
                   throws InvalidEntryException
Description copied from class: BaseRegistry
This method is used to only set the entry in the local memory cache of the registry without any coherency check with persistent storage

Specified by:
setLocalEntry in interface LocalRegistry
Overrides:
setLocalEntry in class BaseRegistry
Parameters:
entry - the RegistryEntry to store
Throws:
InvalidEntryException
See Also:
Registry#setEntry

addLocalEntry

public void addLocalEntry(RegistryEntry entry)
                   throws InvalidEntryException
Description copied from class: BaseRegistry
This method is used to only add the entry in the local memory cache of the registry without any coherency check with persistent storage

Specified by:
addLocalEntry in interface LocalRegistry
Overrides:
addLocalEntry in class BaseRegistry
Parameters:
entry - the RegistryEntry to store
Throws:
InvalidEntryException
See Also:
Registry.addEntry(java.lang.String, org.apache.jetspeed.om.registry.RegistryEntry)

removeLocalEntry

public void removeLocalEntry(java.lang.String name)
Description copied from class: BaseRegistry
This method is used to only remove the entry from the local memory cache of the registry without any coherency check with persistent storage

Specified by:
removeLocalEntry in interface LocalRegistry
Overrides:
removeLocalEntry in class BaseRegistry
Parameters:
name - the name of the RegistryEntry to remove
See Also:
Registry.removeEntry(java.lang.String, java.lang.String)

removeLocalEntry

public void removeLocalEntry(RegistryEntry entry)
Description copied from class: BaseRegistry
This method is used to only remove the entry from the local memory cache of the registry without any coherency check with persistent storage

Specified by:
removeLocalEntry in interface LocalRegistry
Overrides:
removeLocalEntry in class BaseRegistry
Parameters:
entry - the RegistryEntry to remove
See Also:
Registry.removeEntry(java.lang.String, java.lang.String)


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.