org.apache.jetspeed.services.registry
Interface RegistryService

All Superinterfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Implementing Classes:
CastorRegistryService, LateInitCastorRegistryService

public interface RegistryService
extends org.apache.turbine.services.Service

This service is a facade for all registry related operations

Version:
$Id: RegistryService.java,v 1.6 2005/03/21 18:21:44 sgala Exp $
Author:
Raphaël Luta
See Also:
Registry

Field Summary
static java.lang.String SERVICE_NAME
          The name of this service
 
Method Summary
 void addEntry(java.lang.String regName, RegistryEntry entry)
          Add a new RegistryEntry in the named Registry.
 RegistryEntry createEntry(java.lang.String regName)
          Creates a new RegistryEntry instance compatible with the current Registry instance implementation
 Registry get(java.lang.String regName)
          Returns a Registry object for further manipulation
 RegistryEntry getEntry(java.lang.String regName, java.lang.String entryName)
          Returns a RegistryEntry from the named Registry.
 java.util.Enumeration getNames()
          List all the registry currently available to this service
 void removeEntry(java.lang.String regName, java.lang.String entryName)
          Deletes a RegistryEntry from the named Registry This is a convenience wrapper around Registry.removeEntry(org.apache.jetspeed.om.registry.RegistryEntry)
 void saveEntry(java.lang.String regName, RegistryEntry entryName)
          Saves a RegistryEntry to the named Registry.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name of this service

See Also:
Constant Field Values
Method Detail

get

public Registry get(java.lang.String regName)
Returns a Registry object for further manipulation

Parameters:
regName - the name of the registry to fetch
Returns:
a Registry object if found by the manager or null

createEntry

public RegistryEntry createEntry(java.lang.String regName)
Creates a new RegistryEntry instance compatible with the current Registry instance implementation

Parameters:
regName - the name of the registry to use
Returns:
the newly created RegistryEntry

getEntry

public RegistryEntry getEntry(java.lang.String regName,
                              java.lang.String entryName)
Returns a RegistryEntry from the named Registry. This is a convenience wrapper around Registry.getEntry(java.lang.String)

Parameters:
regName - the name of the registry
entryName - the name of the entry to retrieve from the registry
Returns:
a RegistryEntry object if the key is found or null

addEntry

public void addEntry(java.lang.String regName,
                     RegistryEntry entry)
              throws RegistryException
Add a new RegistryEntry in the named Registry. This is a convenience wrapper around Registry.addEntry(org.apache.jetspeed.om.registry.RegistryEntry)

Parameters:
regName - the name of the registry
entry - the Registry entry to add
Throws:
Sends - a RegistryException if the manager can't add the provided entry
RegistryException

removeEntry

public void removeEntry(java.lang.String regName,
                        java.lang.String entryName)
Deletes a RegistryEntry from the named Registry This is a convenience wrapper around Registry.removeEntry(org.apache.jetspeed.om.registry.RegistryEntry)

Parameters:
regName - the name of the registry
entryName - the name of the entry to remove

saveEntry

public void saveEntry(java.lang.String regName,
                      RegistryEntry entryName)
               throws RegistryException
Saves a RegistryEntry to the named Registry. This should save the entry immediately to the underlying storage mechanism. This is a convenience wrapper around Registry.removeEntry(org.apache.jetspeed.om.registry.RegistryEntry)

Parameters:
regName - the name of the registry
entryName - the name of the entry to remove
Throws:
RegistryException

getNames

public java.util.Enumeration getNames()
List all the registry currently available to this service

Returns:
an Enumeration of registry names.


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