org.apache.jetspeed.om.registry
Interface Registry

All Known Subinterfaces:
ClientRegistry, LocalRegistry, MediaTypeRegistry, PortletRegistry
All Known Implementing Classes:
BaseClientRegistry, BaseMediaTypeRegistry, BaseOrderedRegistry, BasePortletRegistry, BaseRegistry, DatabaseRegistry

public interface Registry

Represents all items within Jetspeed that hold configuration information.

Version:
$Id: Registry.java,v 1.8 2005/03/21 18:21:37 sgala Exp $
Author:
Kevin A. Burton, Raphaël Luta

Method Summary
 void addEntry(RegistryEntry entry)
          Add the given entry to the registry with the given name.
 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 setEntry(RegistryEntry entry)
          Set the entry in the registry with the specified name and Entry
 RegistryEntry[] toArray()
          Get all entries within this Registry as an array
 

Method Detail

getEntryCount

public int getEntryCount()
Get the number of entries within the Registry.

Returns:
the number of elements in this Registry instance

createEntry

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

Returns:
the newly created RegistryEntry

getEntry

public RegistryEntry getEntry(java.lang.String name)
                       throws RegistryException
Get the entry in the registry with the specified name

Throws:
RegistryException - if the given 'name' does not exist within the Registry

setEntry

public void setEntry(RegistryEntry entry)
              throws RegistryException
Set the entry in the registry with the specified name and Entry

Throws:
RegistryException - if the given 'name' does not exist within the Registry

addEntry

public void addEntry(RegistryEntry entry)
              throws RegistryException
Add the given entry to the registry with the given name.

Throws:
RegistryException - if the given 'name' already exists within the Registry

hasEntry

public boolean hasEntry(java.lang.String name)
Tests if an entry with the specified name exists within the 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

removeEntry

public void removeEntry(RegistryEntry entry)
Removes the given entry from the Registry

Parameters:
entry - the RegistryEntry to remove

removeEntry

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

Parameters:
name - the name of the entry to remove from the Registry

getEntries

public java.util.Enumeration getEntries()
Get all entries within this Registry

Returns:
an Enumeration of all unordered current entries

listEntryNames

public java.util.Iterator listEntryNames()
List all the entry names within this Registry

Returns:
an Iterator over an unordered list of current entry names

toArray

public RegistryEntry[] toArray()
Get all entries within this Registry as an array

Returns:
an unordered array of current registry entries


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