public class ConcreteNameComponentNormalizer extends java.lang.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(java.lang.String id)
Checks to see if an attribute name/oid is defined.
|
private Normalizer |
lookup(java.lang.String id)
Looks up the Normalizer to use for a name component using the attributeId
for the name component.
|
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.
|
private java.lang.String |
unescape(java.lang.String value) |
private final SchemaManager schemaManager
public ConcreteNameComponentNormalizer(SchemaManager schemaManager)
schemaManager - the schemaManager used to dynamically resolve Normalizersprivate java.lang.String unescape(java.lang.String value)
public java.lang.Object normalizeByName(java.lang.String name,
java.lang.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 java.lang.Object normalizeByName(java.lang.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 java.lang.Object normalizeByOid(java.lang.String oid,
java.lang.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 java.lang.Object normalizeByOid(java.lang.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(java.lang.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(java.lang.String id)
NameComponentNormalizerisDefined in interface NameComponentNormalizerid - the name/oid of the attribute to see if it is definedNameComponentNormalizer.isDefined(String)public java.lang.String normalizeName(java.lang.String attributeName)
throws LdapException
NameComponentNormalizernormalizeName in interface NameComponentNormalizerattributeName - the name or OID of the attributeTypeLdapException - if the attributeName is not recognized as a valid alias