org.apache.directory.shared.ldap.schema
Class DnNormalizer

java.lang.Object
  extended byorg.apache.directory.shared.ldap.schema.DnNormalizer
All Implemented Interfaces:
Normalizer

public class DnNormalizer
extends java.lang.Object
implements Normalizer

A distinguished name normalizer that works with a schema or without.

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

Constructor Summary
DnNormalizer()
          Creates a Dn Normalizer which normalizes distinguished names by performing a deep trim to lower case normalization on assertion values regardless of the attributeType of the name component.
DnNormalizer(NameComponentNormalizer normalizer)
          Creates a Dn Normalizer which uses a name component normalizer to dynamically normalize all name component assertion values based on attributeType.
DnNormalizer(Normalizer normalizer)
          Creates a Dn Normalizer which normalizes distinguished names by using the same Normalizer to to normalize assertion values regardless of the attributeType of the name component.
 
Method Summary
 java.lang.Object normalize(java.lang.Object value)
          Normalizes the value if it is a Name or a String returning the String representation always.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DnNormalizer

public DnNormalizer()
             throws javax.naming.NamingException
Creates a Dn Normalizer which normalizes distinguished names by performing a deep trim to lower case normalization on assertion values regardless of the attributeType of the name component.


DnNormalizer

public DnNormalizer(Normalizer normalizer)
             throws javax.naming.NamingException
Creates a Dn Normalizer which normalizes distinguished names by using the same Normalizer to to normalize assertion values regardless of the attributeType of the name component.

Parameters:
normalizer - Normalizer to use for values regardless of attributeType

DnNormalizer

public DnNormalizer(NameComponentNormalizer normalizer)
             throws javax.naming.NamingException
Creates a Dn Normalizer which uses a name component normalizer to dynamically normalize all name component assertion values based on attributeType.

Parameters:
normalizer - the name component normalizer to use
Method Detail

normalize

public java.lang.Object normalize(java.lang.Object value)
                           throws javax.naming.NamingException
Normalizes the value if it is a Name or a String returning the String representation always. If the value is not a String or a Name the object is returned as is.

Specified by:
normalize in interface Normalizer
Parameters:
value - the value to normalize. It must *not* be null !
Returns:
the normalized form for a value
Throws:
javax.naming.NamingException - if an error results during normalization
See Also:
Normalizer.normalize(java.lang.Object)


Copyright © 2003-2006 . All Rights Reserved.