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

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

public class GlobalNormalizerRegistry
extends java.lang.Object
implements NormalizerRegistry

A simple POJO implementation of the NormalizerRegistry service interface.

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

Constructor Summary
GlobalNormalizerRegistry(BootstrapNormalizerRegistry bootstrap)
          Creates a default NormalizerRegistry 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 hasNormalizer(java.lang.String oid)
          Checks to see if a Normalizer exists.
 Normalizer lookup(java.lang.String oid)
          Looks up a Normalizer by its unique Object Identifier.
 void register(java.lang.String schema, java.lang.String oid, Normalizer normalizer)
          Registers a Normalizer with this registry.
 void setMonitor(NormalizerRegistryMonitor 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

GlobalNormalizerRegistry

public GlobalNormalizerRegistry(BootstrapNormalizerRegistry bootstrap)
Creates a default NormalizerRegistry by initializing the map and the montior.

Method Detail

setMonitor

public void setMonitor(NormalizerRegistryMonitor 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,
                     Normalizer normalizer)
              throws javax.naming.NamingException
Description copied from interface: NormalizerRegistry
Registers a Normalizer with this registry.

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

lookup

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

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

hasNormalizer

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

Specified by:
hasNormalizer in interface NormalizerRegistry
Parameters:
oid - the object identifier
Returns:
true if a Normalizer 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: NormalizerRegistry
Gets the name of the schema this schema object is associated with.

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