public class ConcreteNameComponentNormalizer extends Object implements NameComponentNormalizer
| Modifier and Type | Field and Description |
|---|---|
private SchemaManager |
schemaManager
the schemaManager used to dynamically resolve Normalizers
|
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDefined(String id)
Checks to see if an attribute name/oid is defined.
|
private Normalizer |
lookup(String id)
Looks up the Normalizer to use for a name component using the attributeId
for the name component.
|
Object |
normalizeByName(AttributeType attributeType,
String value)
Normalizes an attribute's value given the name of the attribute - short
names like 'cn' as well as 'commonName' should work here.
|
Object |
normalizeByName(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.
|
Object |
normalizeByName(String name,
String value)
Normalizes an attribute's value given the name of the attribute - short
names like 'cn' as well as 'commonName' should work here.
|
Object |
normalizeByOid(String oid,
byte[] value)
Normalizes an attribute's value given the OID of the attribute.
|
Object |
normalizeByOid(String oid,
String value)
Normalizes an attribute's value given the OID of the attribute.
|
String |
normalizeName(String attributeName)
Normalizes the attribute name/alias to use the OID for it instead.
|
private String |
unescape(String value) |
private final SchemaManager schemaManager
public ConcreteNameComponentNormalizer(SchemaManager schemaManager)
schemaManager - the schemaManager used to dynamically resolve Normalizerspublic Object normalizeByName(String name, String value) throws LdapException
normalizeByName in interface NameComponentNormalizername - the name of the attributevalue - the value of the attribute to normalizeLdapException - if there is a recognition problem or a syntax issuepublic Object normalizeByName(AttributeType attributeType, String value) throws LdapException
normalizeByName in interface NameComponentNormalizerattributeType - the attributeTypevalue - the value of the attribute to normalizeLdapException - if there is a recognition problem or a syntax issuepublic Object normalizeByName(String name, byte[] value) throws LdapException
normalizeByName in interface NameComponentNormalizername - the name of the attributevalue - the value of the attribute to normalizeLdapException - if there is a recognition problem or a syntax issuepublic Object normalizeByOid(String oid, String value) throws LdapException
normalizeByOid in interface NameComponentNormalizeroid - the OID of the attributevalue - the value of the attribute to normalizeLdapException - if there is a recognition problem or a syntax issuepublic Object normalizeByOid(String oid, byte[] value) throws LdapException
normalizeByOid in interface NameComponentNormalizeroid - the OID of the attributevalue - the value of the attribute to normalizeLdapException - if there is a recognition problem or a syntax issueprivate Normalizer lookup(String id) throws LdapException
id - the name or oid of the attribute in the name component to
normalize the value ofLdapException - if there are failures resolving the Normalizerpublic boolean isDefined(String id)
NameComponentNormalizerisDefined in interface NameComponentNormalizerid - the name/oid of the attribute to see if it is definedNameComponentNormalizer.isDefined(String)public String normalizeName(String attributeName) throws LdapException
normalizeName in interface NameComponentNormalizerattributeName - the name or OID of the attributeTypeLdapException - if the attributeName is not recognized as a valid aliasCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.