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

java.lang.Object
  extended by org.apache.directory.server.core.schema.GlobalNameFormRegistry
All Implemented Interfaces:
NameFormRegistry

public class GlobalNameFormRegistry
extends java.lang.Object
implements NameFormRegistry

A plain old java object implementation of an NameFormRegistry.

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

Constructor Summary
GlobalNameFormRegistry(BootstrapNameFormRegistry bootstrap, OidRegistry oidRegistry)
          Creates an empty BootstrapNameFormRegistry.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String id)
          Gets the name of the schema this schema object is associated with.
 boolean hasNameForm(java.lang.String id)
          Checks to see if an nameForm exists.
 java.util.Iterator list()
          Lists all the NameForms within this registry.
 NameForm lookup(java.lang.String id)
          Looks up a nameForm by its unique Object Identifier or by name.
 void register(java.lang.String schema, NameForm dITContentRule)
          Registers a NameForm with this registry.
 void setMonitor(NameFormRegistryMonitor 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

GlobalNameFormRegistry

public GlobalNameFormRegistry(BootstrapNameFormRegistry bootstrap,
                              OidRegistry oidRegistry)
Creates an empty BootstrapNameFormRegistry.

Method Detail

setMonitor

public void setMonitor(NameFormRegistryMonitor 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,
                     NameForm dITContentRule)
              throws javax.naming.NamingException
Description copied from interface: NameFormRegistry
Registers a NameForm with this registry.

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

lookup

public NameForm lookup(java.lang.String id)
                throws javax.naming.NamingException
Description copied from interface: NameFormRegistry
Looks up a nameForm by its unique Object Identifier or by name.

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

hasNameForm

public boolean hasNameForm(java.lang.String id)
Description copied from interface: NameFormRegistry
Checks to see if an nameForm exists.

Specified by:
hasNameForm in interface NameFormRegistry
Parameters:
id - the object identifier or name
Returns:
true if an nameForm definition exists for the oid, false otherwise

getSchemaName

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

Specified by:
getSchemaName in interface NameFormRegistry
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: NameFormRegistry
Lists all the NameForms within this registry.

Specified by:
list in interface NameFormRegistry
Returns:
an Iterator over all the NameForms within this registry