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

java.lang.Object
  extended byorg.apache.directory.server.core.schema.GlobalSyntaxCheckerRegistry
All Implemented Interfaces:
SyntaxCheckerRegistry

public class GlobalSyntaxCheckerRegistry
extends java.lang.Object
implements SyntaxCheckerRegistry

A simple POJO implementation of the SyntaxCheckerRegistry service interface.

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

Constructor Summary
GlobalSyntaxCheckerRegistry(BootstrapSyntaxCheckerRegistry bootstrap)
          Creates a default SyntaxCheckerRegistry by initializing the map and the montior.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String oid)
          Gets the name of the schema this schema object is associated with.
 boolean hasSyntaxChecker(java.lang.String oid)
          Checks to see if a SyntaxChecker exists.
 SyntaxChecker lookup(java.lang.String oid)
          Looks up a SyntaxChecker by its unique Object Identifier.
 void register(java.lang.String schema, java.lang.String oid, SyntaxChecker syntaxChecker)
          Registers a SyntaxChecker with this registry.
 void setMonitor(SyntaxCheckerRegistryMonitor monitor)
          Sets the monitor used by this registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalSyntaxCheckerRegistry

public GlobalSyntaxCheckerRegistry(BootstrapSyntaxCheckerRegistry bootstrap)
Creates a default SyntaxCheckerRegistry by initializing the map and the montior.

Method Detail

setMonitor

public void setMonitor(SyntaxCheckerRegistryMonitor monitor)
Sets the monitor used by this registry.

Parameters:
monitor - the monitor to set for registry event callbacks

register

public void register(java.lang.String schema,
                     java.lang.String oid,
                     SyntaxChecker syntaxChecker)
              throws javax.naming.NamingException
Description copied from interface: SyntaxCheckerRegistry
Registers a SyntaxChecker with this registry.

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

lookup

public SyntaxChecker lookup(java.lang.String oid)
                     throws javax.naming.NamingException
Description copied from interface: SyntaxCheckerRegistry
Looks up a SyntaxChecker by its unique Object Identifier.

Specified by:
lookup in interface SyntaxCheckerRegistry
Parameters:
oid - the object identifier
Returns:
the SyntaxChecker for the oid
Throws:
javax.naming.NamingException - if there is a backing store failure or the SyntaxChecker does not exist.

hasSyntaxChecker

public boolean hasSyntaxChecker(java.lang.String oid)
Description copied from interface: SyntaxCheckerRegistry
Checks to see if a SyntaxChecker exists. Backing store failures simply return false.

Specified by:
hasSyntaxChecker in interface SyntaxCheckerRegistry
Parameters:
oid - the object identifier
Returns:
true if a SyntaxChecker definition exists for the oid, false otherwise

getSchemaName

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

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