org.apache.directory.shared.ldap.schema.normalizers
Class ConcreteNameComponentNormalizer

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.normalizers.ConcreteNameComponentNormalizer
All Implemented Interfaces:
NameComponentNormalizer

public class ConcreteNameComponentNormalizer
extends java.lang.Object
implements NameComponentNormalizer

A DN Name component Normalizer which uses the bootstrap registries to find the appropriate normalizer for the attribute of the name component with which to normalize the name component value.

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

Constructor Summary
ConcreteNameComponentNormalizer(SchemaManager schemaManager)
          Creates a DN Name component Normalizer which uses the bootstrap registries to find the appropriate normalizer for the attribute of the name component with which to normalize the name component value.
 
Method Summary
 boolean isDefined(java.lang.String id)
          Checks to see if an attribute name/oid is defined.
 java.lang.Object normalizeByName(java.lang.String name, byte[] value)
          Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.
 java.lang.Object normalizeByName(java.lang.String name, java.lang.String value)
          Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.
 java.lang.Object normalizeByOid(java.lang.String oid, byte[] value)
          Normalizes an attribute's value given the OID of the attribute.
 java.lang.Object normalizeByOid(java.lang.String oid, java.lang.String value)
          Normalizes an attribute's value given the OID of the attribute.
 java.lang.String normalizeName(java.lang.String attributeName)
          Normalizes the attribute name/alias to use the OID for it instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcreteNameComponentNormalizer

public ConcreteNameComponentNormalizer(SchemaManager schemaManager)
Creates a DN Name component Normalizer which uses the bootstrap registries to find the appropriate normalizer for the attribute of the name component with which to normalize the name component value.

Parameters:
schemaManager - the schemaManager used to dynamically resolve Normalizers
Method Detail

normalizeByName

public java.lang.Object normalizeByName(java.lang.String name,
                                        java.lang.String value)
                                 throws LdapException
Description copied from interface: NameComponentNormalizer
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.

Specified by:
normalizeByName in interface NameComponentNormalizer
Parameters:
name - the name of the attribute
value - the value of the attribute to normalize
Returns:
the normalized value
Throws:
LdapException - if there is a recognition problem or a syntax issue
See Also:
NameComponentNormalizer.normalizeByName(String, String)

normalizeByName

public java.lang.Object normalizeByName(java.lang.String name,
                                        byte[] value)
                                 throws LdapException
Description copied from interface: NameComponentNormalizer
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.

Specified by:
normalizeByName in interface NameComponentNormalizer
Parameters:
name - the name of the attribute
value - the value of the attribute to normalize
Returns:
the normalized value
Throws:
LdapException - if there is a recognition problem or a syntax issue
See Also:
NameComponentNormalizer.normalizeByName(String, String)

normalizeByOid

public java.lang.Object normalizeByOid(java.lang.String oid,
                                       java.lang.String value)
                                throws LdapException
Description copied from interface: NameComponentNormalizer
Normalizes an attribute's value given the OID of the attribute.

Specified by:
normalizeByOid in interface NameComponentNormalizer
Parameters:
oid - the OID of the attribute
value - the value of the attribute to normalize
Returns:
the normalized value
Throws:
LdapException - if there is a recognition problem or a syntax issue
See Also:
NameComponentNormalizer.normalizeByOid(String, String)

normalizeByOid

public java.lang.Object normalizeByOid(java.lang.String oid,
                                       byte[] value)
                                throws LdapException
Description copied from interface: NameComponentNormalizer
Normalizes an attribute's value given the OID of the attribute.

Specified by:
normalizeByOid in interface NameComponentNormalizer
Parameters:
oid - the OID of the attribute
value - the value of the attribute to normalize
Returns:
the normalized value
Throws:
LdapException - if there is a recognition problem or a syntax issue
See Also:
NameComponentNormalizer.normalizeByOid(String, String)

isDefined

public boolean isDefined(java.lang.String id)
Description copied from interface: NameComponentNormalizer
Checks to see if an attribute name/oid is defined.

Specified by:
isDefined in interface NameComponentNormalizer
Parameters:
id - the name/oid of the attribute to see if it is defined
Returns:
true if it is, false otherwise
See Also:
NameComponentNormalizer.isDefined(String)

normalizeName

public java.lang.String normalizeName(java.lang.String attributeName)
                               throws LdapException
Description copied from interface: NameComponentNormalizer
Normalizes the attribute name/alias to use the OID for it instead.

Specified by:
normalizeName in interface NameComponentNormalizer
Parameters:
attributeName - the name or OID of the attributeType
Returns:
the OID of the attributeType if it is recognized
Throws:
LdapException - if the attributeName is not recognized as a valid alias


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