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

All Known Implementing Classes:
BootstrapSyntaxRegistry, GlobalSyntaxRegistry

public interface SyntaxRegistry

Manages the lookup and registration of Syntaxes within the system by OID.

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 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.
 

Method Detail

lookup

Syntax lookup(java.lang.String id)
              throws javax.naming.NamingException
Looks up a Syntax by its unique Object Identifier or by name.

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.

register

void register(java.lang.String schema,
              Syntax syntax)
              throws javax.naming.NamingException
Registers a Syntax with this registry.

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

getSchemaName

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

hasSyntax

boolean hasSyntax(java.lang.String id)
Checks to see if a Syntax exists. Backing store failures simply return false.

Parameters:
id - the object identifier or name
Returns:
true if a Syntax definition exists for the id, false otherwise

list

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

Returns:
an Iterator over all the Syntaxes within this registry