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

java.lang.Object
  extended byorg.apache.jetspeed.om.registry.base.BaseRegistry
All Implemented Interfaces:
LocalRegistry, Registry
Direct Known Subclasses:
BasePortletControllerRegistry, BasePortletControlRegistry, BasePortletRegistry, BaseSecurityRegistry, BaseSkinRegistry, DatabaseRegistry

public class BaseRegistry
extends java.lang.Object
implements LocalRegistry

Provides base functionality within a Registry.

Version:
$Id: BaseRegistry.java,v 1.9 2005/04/27 14:08:24 raphael Exp $
Author:
Kevin A. Burton, RaphaŽl Luta

Field Summary
protected static boolean DEBUG
           
protected  java.util.Map entries
           
 
Constructor Summary
BaseRegistry()
           
 
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.Enumeration getEntries()
          Get all entries within this Registry
 RegistryEntry getEntry(java.lang.String name)
          Get the entry in the registry with the specified name
 int getEntryCount()
          Get the number of entries within the Registry.
 boolean hasEntry(java.lang.String name)
          Tests if an entry with the specified name exists within the Registry
 java.util.Iterator listEntryNames()
          List all the entry names within this Registry
 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
 RegistryEntry[] toArray()
          Get all entries within this Registry as an array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

protected static final boolean DEBUG
See Also:
Constant Field Values

entries

protected java.util.Map entries
Constructor Detail

BaseRegistry

public BaseRegistry()
Method Detail

getEntryCount

public int getEntryCount()
Description copied from interface: Registry
Get the number of entries within the Registry.

Specified by:
getEntryCount in interface Registry
Returns:
the number of elements in this Registry instance
See Also:
Registry#getEntryCount

getEntry

public RegistryEntry getEntry(java.lang.String name)
                       throws InvalidEntryException
Description copied from interface: Registry
Get the entry in the registry with the specified name

Specified by:
getEntry in interface Registry
Throws:
InvalidEntryException
See Also:
Registry#getEntry

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
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
Throws:
InvalidEntryException
See Also:
Registry#addEntry

hasEntry

public boolean hasEntry(java.lang.String name)
Description copied from interface: Registry
Tests if an entry with the specified name exists within the Registry

Specified by:
hasEntry in interface Registry
Parameters:
name - the name of the entry that we are looking for
Returns:
true if an entry with this name exists in the Registry
See Also:
Registry#hasEntry

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
Parameters:
name - the name of the entry to remove from the Registry
See Also:
Registry#removeEntry

removeEntry

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

Specified by:
removeEntry in interface Registry
Parameters:
entry - the RegistryEntry to remove
See Also:
Registry#removeEntry

getEntries

public java.util.Enumeration getEntries()
Description copied from interface: Registry
Get all entries within this Registry

Specified by:
getEntries in interface Registry
Returns:
an Enumeration of all unordered current entries
See Also:
Registry#getEntries

listEntryNames

public java.util.Iterator listEntryNames()
Description copied from interface: Registry
List all the entry names within this Registry

Specified by:
listEntryNames in interface Registry
Returns:
an Iterator over an unordered list of current entry names
See Also:
Registry#listEntryNames

toArray

public RegistryEntry[] toArray()
Description copied from interface: Registry
Get all entries within this Registry as an array

Specified by:
toArray in interface Registry
Returns:
an unordered array of current registry entries
See Also:
Registry#toArray

createEntry

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

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

setLocalEntry

public void setLocalEntry(RegistryEntry entry)
                   throws InvalidEntryException
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
Parameters:
entry - the RegistryEntry to store
Throws:
InvalidEntryException

addLocalEntry

public void addLocalEntry(RegistryEntry entry)
                   throws InvalidEntryException
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
Parameters:
entry - the RegistryEntry to store
Throws:
InvalidEntryException

removeLocalEntry

public 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

Specified by:
removeLocalEntry in interface LocalRegistry
Parameters:
name - the name of the RegistryEntry to remove

removeLocalEntry

public 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

Specified by:
removeLocalEntry in interface LocalRegistry
Parameters:
entry - the RegistryEntry to remove


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