org.apache.directory.server.core.schema
Interface NameFormRegistry

All Known Implementing Classes:
BootstrapNameFormRegistry, GlobalNameFormRegistry

public interface NameFormRegistry

An NameForm registry service interface.

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

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 nameForm)
          Registers a NameForm with this registry.
 

Method Detail

register

public void register(java.lang.String schema,
                     NameForm nameForm)
              throws javax.naming.NamingException
Registers a NameForm with this registry.

Parameters:
schema - the name of the schema the NameForm is associated with
nameForm - 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
Looks up a nameForm by its unique Object Identifier or by name.

Parameters:
id - the object identifier or name
Returns:
the NameForm instance for the id
Throws:
javax.naming.NamingException - if the NameForm does not exist

getSchemaName

public java.lang.String getSchemaName(java.lang.String id)
                               throws javax.naming.NamingException
Gets the name of the schema this schema object is associated with.

Parameters:
id - the object identifier or the name
Returns:
the schema name
Throws:
javax.naming.NamingException - if the schema object does not exist

hasNameForm

public boolean hasNameForm(java.lang.String id)
Checks to see if an nameForm exists.

Parameters:
id - the object identifier or name
Returns:
true if an nameForm definition exists for the oid, false otherwise

list

public java.util.Iterator list()
Lists all the NameForms within this registry.

Returns:
an Iterator over all the NameForms within this registry