Interface NameComponentNormalizer
-
- All Known Implementing Classes:
ConcreteNameComponentNormalizer
public interface NameComponentNormalizer
Normalizers of ldap name component attributes and their values.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isDefined(String id)
Checks to see if an attribute name/oid is defined.Object
normalizeByName(String attributeName, 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 attributeName, 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(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
normalizeByOid(String attributeOid, byte[] value)
Normalizes an attribute's value given the OID of the attribute.Object
normalizeByOid(String attributeOid, 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.
-
-
-
Method Detail
-
isDefined
boolean isDefined(String id)
Checks to see if an attribute name/oid is defined.- Parameters:
id
- the name/oid of the attribute to see if it is defined- Returns:
- true if it is, false otherwise
-
normalizeName
String normalizeName(String attributeName) throws LdapException
Normalizes the attribute name/alias to use the OID for it instead.- 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
-
normalizeByName
Object normalizeByName(String attributeName, String value) throws LdapException
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.- Parameters:
attributeName
- the name of the attributevalue
- the value of the attribute to normalize- Returns:
- the normalized value
- Throws:
LdapException
- if there is a recognition problem or a syntax issue
-
normalizeByName
Object normalizeByName(AttributeType attributeType, String value) throws LdapException
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.- Parameters:
attributeType
- the attributeTypevalue
- the value of the attribute to normalize- Returns:
- the normalized value
- Throws:
LdapException
- if there is a recognition problem or a syntax issue
-
normalizeByName
Object normalizeByName(String attributeName, byte[] value) throws LdapException
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.- Parameters:
attributeName
- the name of the attributevalue
- the value of the attribute to normalize- Returns:
- the normalized value
- Throws:
LdapException
- if there is a recognition problem or a syntax issue
-
normalizeByOid
Object normalizeByOid(String attributeOid, String value) throws LdapException
Normalizes an attribute's value given the OID of the attribute.- Parameters:
attributeOid
- the OID of the attributevalue
- the value of the attribute to normalize- Returns:
- the normalized value
- Throws:
LdapException
- if there is a recognition problem or a syntax issue
-
normalizeByOid
Object normalizeByOid(String attributeOid, byte[] value) throws LdapException
Normalizes an attribute's value given the OID of the attribute.- Parameters:
attributeOid
- the OID of the attributevalue
- the value of the attribute to normalize- Returns:
- the normalized value
- Throws:
LdapException
- if there is a recognition problem or a syntax issue
-
-