Class ConcreteNameComponentNormalizer
java.lang.Object
org.apache.directory.api.ldap.model.schema.normalizers.ConcreteNameComponentNormalizer
- All Implemented Interfaces:
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.
- Author:
- Apache Directory Project
-
Constructor Summary
ConstructorsConstructorDescriptionConcreteNameComponentNormalizer(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
Modifier and TypeMethodDescriptionbooleanChecks to see if an attribute name/oid is defined.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.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.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.normalizeByOid(String oid, byte[] value) Normalizes an attribute's value given the OID of the attribute.normalizeByOid(String oid, String value) Normalizes an attribute's value given the OID of the attribute.normalizeName(String attributeName) Normalizes the attribute name/alias to use the OID for it instead.
-
Constructor Details
-
ConcreteNameComponentNormalizer
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 Details
-
normalizeByName
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.- Specified by:
normalizeByNamein interfaceNameComponentNormalizer- Parameters:
name- 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
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.- Specified by:
normalizeByNamein interfaceNameComponentNormalizer- 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
Normalizes an attribute's value given the name of the attribute - short names like 'cn' as well as 'commonName' should work here.- Specified by:
normalizeByNamein interfaceNameComponentNormalizer- Parameters:
name- 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
Normalizes an attribute's value given the OID of the attribute.- Specified by:
normalizeByOidin interfaceNameComponentNormalizer- Parameters:
oid- 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
Normalizes an attribute's value given the OID of the attribute.- Specified by:
normalizeByOidin interfaceNameComponentNormalizer- Parameters:
oid- 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
-
isDefined
Description copied from interface:NameComponentNormalizerChecks to see if an attribute name/oid is defined.- Specified by:
isDefinedin interfaceNameComponentNormalizer- Parameters:
id- the name/oid of the attribute to see if it is defined- Returns:
- true if it is, false otherwise
- See Also:
-
normalizeName
Normalizes the attribute name/alias to use the OID for it instead.- Specified by:
normalizeNamein interfaceNameComponentNormalizer- 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
-