org.apache.directory.server.schema.registries
Class DefaultNormalizerRegistry

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

public class DefaultNormalizerRegistry
extends java.lang.Object
implements NormalizerRegistry

The POJO implementation for the NormalizerRegistry service.

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

Constructor Summary
DefaultNormalizerRegistry()
          Creates a new default DefaultNormalizerRegistry.
 
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.
 org.apache.directory.shared.ldap.schema.Normalizer lookup(java.lang.String oid)
          Looks up a Normalizer by its unique Object Identifier.
 java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription> normalizerDescriptionIterator()
          Used to iterate through all normalizerDescriptions.
 java.util.Iterator<java.lang.String> oidIterator()
          Used to iterate through all normalizers.
 void register(org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription description, org.apache.directory.shared.ldap.schema.Normalizer normalizer)
          Registers a Normalizer with this registry.
 void renameSchema(java.lang.String originalSchemaName, java.lang.String newSchemaName)
          Renames the schemaName associated with entities within this registry to a new schema name.
 void unregister(java.lang.String oid)
          Unregisters a normalizer from this registry by OID.
 void unregisterSchemaElements(java.lang.String schemaName)
          Unregisters normalizers from this registry associated with a schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNormalizerRegistry

public DefaultNormalizerRegistry()
Creates a new default DefaultNormalizerRegistry.

Method Detail

register

public void register(org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription description,
                     org.apache.directory.shared.ldap.schema.Normalizer normalizer)
              throws javax.naming.NamingException
Description copied from interface: NormalizerRegistry
Registers a Normalizer with this registry.

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

lookup

public org.apache.directory.shared.ldap.schema.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

oidIterator

public java.util.Iterator<java.lang.String> oidIterator()
Description copied from interface: NormalizerRegistry
Used to iterate through all normalizers. We have to iterate over the OID String keys because these objects do not associate a matchingRule OID with them as a class member.

Specified by:
oidIterator in interface NormalizerRegistry
Returns:
an Iterator over the set of OID Strings in this registry

unregister

public void unregister(java.lang.String oid)
                throws javax.naming.NamingException
Description copied from interface: NormalizerRegistry
Unregisters a normalizer from this registry by OID.

Specified by:
unregister in interface NormalizerRegistry
Parameters:
oid - the numeric OID of the matchingRule the normalizer is for
Throws:
javax.naming.NamingException - if the provided argument is not a numeric OID

unregisterSchemaElements

public void unregisterSchemaElements(java.lang.String schemaName)
Description copied from interface: NormalizerRegistry
Unregisters normalizers from this registry associated with a schema.

Specified by:
unregisterSchemaElements in interface NormalizerRegistry
Parameters:
schemaName - the name of the schema whose normalizers are removed from this registry

renameSchema

public void renameSchema(java.lang.String originalSchemaName,
                         java.lang.String newSchemaName)
Description copied from interface: NormalizerRegistry
Renames the schemaName associated with entities within this registry to a new schema name.

Specified by:
renameSchema in interface NormalizerRegistry
Parameters:
originalSchemaName - the original schema name
newSchemaName - the new name to give to the schema

normalizerDescriptionIterator

public java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription> normalizerDescriptionIterator()
Description copied from interface: NormalizerRegistry
Used to iterate through all normalizerDescriptions.

Specified by:
normalizerDescriptionIterator in interface NormalizerRegistry
Returns:
an Iterator over the set of NormalizerDescriptions in this registry


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.