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

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

public class BaseSecurityRegistry
extends BaseRegistry

Extends BaseRegistry implementation to override object creation method and ensure Registry object is synchronized with its persistence backend by delegating actual addition/deletion of objects to the registry service.

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: BaseSecurityRegistry.java,v 1.7 2005/03/21 18:21:37 sgala Exp $
Author:
Raphaël Luta

Field Summary
 
Fields inherited from class org.apache.jetspeed.om.registry.base.BaseRegistry
DEBUG, entries
 
Constructor Summary
BaseSecurityRegistry()
           
 
Method Summary
 void addEntry(RegistryEntry entry)
          Add the given entry to the registry with the given name.
 SecurityEntry cloneSecurityEntry(java.lang.String original, java.lang.String newName)
          Makes an exact copy of the named role, but changing the nmae attribute to the value of newName
 RegistryEntry createEntry()
          Creates a new RegistryEntry instance compatible with the current Registry instance implementation
 SecurityEntry createSecurityEntry()
           
 SecurityEntry getSecurityEntry(java.lang.String name)
          returns a security entry from the registry based on the name provided
 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
 
Methods inherited from class org.apache.jetspeed.om.registry.base.BaseRegistry
addLocalEntry, getEntries, getEntry, getEntryCount, hasEntry, listEntryNames, removeLocalEntry, removeLocalEntry, setLocalEntry, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseSecurityRegistry

public BaseSecurityRegistry()
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)

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

getSecurityEntry

public SecurityEntry getSecurityEntry(java.lang.String name)
returns a security entry from the registry based on the name provided

Returns:
SecurityEntry SecurityEntry matching the name argument or null if no such entry exists.

createSecurityEntry

public SecurityEntry createSecurityEntry()
Returns:
SecurityEntry a new SecurityEntry instance

cloneSecurityEntry

public SecurityEntry cloneSecurityEntry(java.lang.String original,
                                        java.lang.String newName)
Makes an exact copy of the named role, but changing the nmae attribute to the value of newName

Returns:
SecurityEntry The cloned entry.


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