Class GenericConverter
java.lang.Object
com.atlassian.crowd.directory.ldap.name.GenericConverter
- All Implemented Interfaces:
Converter
See Converter interface for details.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEscapes and converts a DN into a Name, for use with LDAP through JNDI.getName
(String attributeName, String objectName, CrowdLdapName baseDn) Returns a Name escaped for JNDI and LDAP, for use with a directory.
-
Constructor Details
-
GenericConverter
public GenericConverter()
-
-
Method Details
-
getName
Description copied from interface:Converter
Escapes and converts a DN into a Name, for use with LDAP through JNDI.- Specified by:
getName
in interfaceConverter
- Throws:
LdapNameFormatException
-
getName
public CrowdLdapName getName(String attributeName, String objectName, CrowdLdapName baseDn) throws LdapNameFormatException Description copied from interface:Converter
Returns a Name escaped for JNDI and LDAP, for use with a directory. Used when building a DN from an object name plus directory configuration information Given: attributeName: "cn" objectName: "Smith, John" baseDN: "dc=example, dc=org" It will return a Name that represents the DN: "cn=Smith\, John, dc=example, dc=org"- Specified by:
getName
in interfaceConverter
baseDn
- A correctly-escaped DN. May be empty or null.- Throws:
LdapNameFormatException
-