public class SimpleNameComponentNormalizer extends Object implements NameComponentNormalizer
Constructor and Description |
---|
SimpleNameComponentNormalizer(Normalizer normalizer)
Creates a new SimpleNameComponentNormalizer with the normalizer it uses
ever time irrespective of the attribute name or oid.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isDefined(String oid)
Checks to see if an attribute name/oid is defined.
|
Object |
normalizeByName(String name,
byte[] val)
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 val)
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[] val)
Normalizes an attribute's value given the OID of the attribute.
|
Object |
normalizeByOid(String oid,
String val)
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.
|
public SimpleNameComponentNormalizer(Normalizer normalizer)
normalizer
- the Normalizer to use for all normalization requestspublic Object normalizeByName(String name, String val) throws LdapException
NameComponentNormalizer
normalizeByName
in interface NameComponentNormalizer
name
- the name of the attributeval
- the value of the attribute to normalizeLdapException
- if there is a recognition problem or a syntax issuepublic Object normalizeByName(String name, byte[] val) throws LdapException
NameComponentNormalizer
normalizeByName
in interface NameComponentNormalizer
name
- the name of the attributeval
- the value of the attribute to normalizeLdapException
- if there is a recognition problem or a syntax issuepublic Object normalizeByOid(String oid, String val) throws LdapException
NameComponentNormalizer
normalizeByOid
in interface NameComponentNormalizer
oid
- the OID of the attributeval
- the value of the attribute to normalizeLdapException
- if there is a recognition problem or a syntax issuepublic Object normalizeByOid(String oid, byte[] val) throws LdapException
NameComponentNormalizer
normalizeByOid
in interface NameComponentNormalizer
oid
- the OID of the attributeval
- the value of the attribute to normalizeLdapException
- if there is a recognition problem or a syntax issuepublic boolean isDefined(String oid)
NameComponentNormalizer
isDefined
in interface NameComponentNormalizer
oid
- the name/oid of the attribute to see if it is definedpublic String normalizeName(String attributeName) throws LdapInvalidDnException
NameComponentNormalizer
normalizeName
in interface NameComponentNormalizer
attributeName
- the name or OID of the attributeTypeLdapInvalidDnException
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.