org.apache.directory.server.core.schema.bootstrap
Class BootstrapSyntaxRegistry

java.lang.Object
  extended byorg.apache.directory.server.core.schema.bootstrap.BootstrapSyntaxRegistry
All Implemented Interfaces:
SyntaxRegistry

public class BootstrapSyntaxRegistry
extends java.lang.Object
implements SyntaxRegistry

A SyntaxRegistry service available during server startup when other resources like a syntax backing store is unavailable.

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

Constructor Summary
BootstrapSyntaxRegistry(OidRegistry registry)
          Creates a BootstrapSyntaxRegistry.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String id)
          Gets the name of the schema this schema object is associated with.
 boolean hasSyntax(java.lang.String id)
          Checks to see if a Syntax exists.
 java.util.Iterator list()
          Lists all the Syntaxes within this registry.
 Syntax lookup(java.lang.String id)
          Looks up a Syntax by its unique Object Identifier or by name.
 void register(java.lang.String schema, Syntax syntax)
          Registers a Syntax with this registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapSyntaxRegistry

public BootstrapSyntaxRegistry(OidRegistry registry)
Creates a BootstrapSyntaxRegistry.

Method Detail

lookup

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

Specified by:
lookup in interface SyntaxRegistry
Parameters:
id - the object identifier or name
Returns:
the Syntax for the id
Throws:
javax.naming.NamingException - if there is a backing store failure or the Syntax does not exist.
See Also:
SyntaxRegistry.lookup(java.lang.String)

register

public void register(java.lang.String schema,
                     Syntax syntax)
              throws javax.naming.NamingException
Description copied from interface: SyntaxRegistry
Registers a Syntax with this registry.

Specified by:
register in interface SyntaxRegistry
Parameters:
schema - the name of the schema the Syntax is associated with
syntax - the Syntax to register
Throws:
javax.naming.NamingException - if the syntax is already registered or the registration operation is not supported
See Also:
SyntaxRegistry.register(String,Syntax)

hasSyntax

public boolean hasSyntax(java.lang.String id)
Description copied from interface: SyntaxRegistry
Checks to see if a Syntax exists. Backing store failures simply return false.

Specified by:
hasSyntax in interface SyntaxRegistry
Parameters:
id - the object identifier or name
Returns:
true if a Syntax definition exists for the id, false otherwise
See Also:
SyntaxRegistry.hasSyntax(java.lang.String)

getSchemaName

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

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

Specified by:
list in interface SyntaxRegistry
Returns:
an Iterator over all the Syntaxes within this registry