org.apache.directory.server.schema.registries
Interface NormalizerRegistry

All Known Implementing Classes:
DefaultNormalizerRegistry

public interface NormalizerRegistry

Normalizer registry service interface.

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

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.
 

Method Detail

register

void register(org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription description,
              org.apache.directory.shared.ldap.schema.Normalizer normalizer)
              throws javax.naming.NamingException
Registers a Normalizer with this registry.

Parameters:
normalizer - the Normalizer to register
Throws:
javax.naming.NamingException - if the Normalizer is already registered or the registration operation is not supported

lookup

org.apache.directory.shared.ldap.schema.Normalizer lookup(java.lang.String oid)
                                                          throws javax.naming.NamingException
Looks up a Normalizer by its unique Object Identifier.

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.

getSchemaName

java.lang.String getSchemaName(java.lang.String oid)
                               throws javax.naming.NamingException
Gets the name of the schema this schema object is associated with.

Parameters:
oid - the object identifier
Returns:
the schema name
Throws:
javax.naming.NamingException - if the schema object does not exist

hasNormalizer

boolean hasNormalizer(java.lang.String oid)
Checks to see if a Normalizer exists. Backing store failures simply return false.

Parameters:
oid - the object identifier
Returns:
true if a Normalizer definition exists for the oid, false otherwise

oidIterator

java.util.Iterator<java.lang.String> oidIterator()
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.

Returns:
an Iterator over the set of OID Strings in this registry

normalizerDescriptionIterator

java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.NormalizerDescription> normalizerDescriptionIterator()
Used to iterate through all normalizerDescriptions.

Returns:
an Iterator over the set of NormalizerDescriptions in this registry

unregister

void unregister(java.lang.String oid)
                throws javax.naming.NamingException
Unregisters a normalizer from this registry by OID.

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

void unregisterSchemaElements(java.lang.String schemaName)
Unregisters normalizers from this registry associated with a schema.

Parameters:
schemaName - the name of the schema whose normalizers are removed from this registry

renameSchema

void renameSchema(java.lang.String originalSchemaName,
                  java.lang.String newSchemaName)
Renames the schemaName associated with entities within this registry to a new schema name.

Parameters:
originalSchemaName - the original schema name
newSchemaName - the new name to give to the schema


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