org.apache.directory.server.core.schema
Class GlobalObjectClassRegistry

java.lang.Object
  extended byorg.apache.directory.server.core.schema.GlobalObjectClassRegistry
All Implemented Interfaces:
ObjectClassRegistry

public class GlobalObjectClassRegistry
extends java.lang.Object
implements ObjectClassRegistry

A plain old java object implementation of an ObjectClassRegistry.

Version:
$Rev: 434579 $
Author:
Apache Directory Project

Constructor Summary
GlobalObjectClassRegistry(BootstrapObjectClassRegistry bootstrap, OidRegistry oidRegistry)
          Creates an empty BootstrapObjectClassRegistry.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String id)
          Gets the name of the schema this schema object is associated with.
 boolean hasObjectClass(java.lang.String id)
          Checks to see if an objectClass exists.
 java.util.Iterator list()
          Gets an Iterator over the ObjectClasses within this ObjectClassRegistry.
 ObjectClass lookup(java.lang.String id)
          Looks up an objectClass by its unique Object Identifier or by name.
 void register(java.lang.String schema, ObjectClass dITContentRule)
          Registers an ObjectClass with this registry.
 void setMonitor(ObjectClassRegistryMonitor monitor)
          Sets the monitor that is to be notified via callback events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalObjectClassRegistry

public GlobalObjectClassRegistry(BootstrapObjectClassRegistry bootstrap,
                                 OidRegistry oidRegistry)
Creates an empty BootstrapObjectClassRegistry.

Method Detail

setMonitor

public void setMonitor(ObjectClassRegistryMonitor monitor)
Sets the monitor that is to be notified via callback events.

Parameters:
monitor - the new monitor to notify of notable events

register

public void register(java.lang.String schema,
                     ObjectClass dITContentRule)
              throws javax.naming.NamingException
Description copied from interface: ObjectClassRegistry
Registers an ObjectClass with this registry.

Specified by:
register in interface ObjectClassRegistry
Parameters:
schema - the name of the schema the ObjectClass is associated with
dITContentRule - the objectClass to register
Throws:
javax.naming.NamingException - if the ObjectClass is already registered or the registration operation is not supported

lookup

public ObjectClass lookup(java.lang.String id)
                   throws javax.naming.NamingException
Description copied from interface: ObjectClassRegistry
Looks up an objectClass by its unique Object Identifier or by name.

Specified by:
lookup in interface ObjectClassRegistry
Parameters:
id - the object identifier or name
Returns:
the ObjectClass instance for the id
Throws:
javax.naming.NamingException - if the ObjectClass does not exist

hasObjectClass

public boolean hasObjectClass(java.lang.String id)
Description copied from interface: ObjectClassRegistry
Checks to see if an objectClass exists.

Specified by:
hasObjectClass in interface ObjectClassRegistry
Parameters:
id - the object identifier or name
Returns:
true if an objectClass definition exists for the id, false otherwise

getSchemaName

public java.lang.String getSchemaName(java.lang.String id)
                               throws javax.naming.NamingException
Description copied from interface: ObjectClassRegistry
Gets the name of the schema this schema object is associated with.

Specified by:
getSchemaName in interface ObjectClassRegistry
Parameters:
id - the object identifier or the name
Returns:
the schema name
Throws:
javax.naming.NamingException - if the schema object does not exist

list

public java.util.Iterator list()
Description copied from interface: ObjectClassRegistry
Gets an Iterator over the ObjectClasses within this ObjectClassRegistry.

Specified by:
list in interface ObjectClassRegistry
Returns:
an iterator over all ObjectClasses in registry