com.atlassian.crowd.directory.ldap.name
Class GenericConverter

java.lang.Object
  extended by com.atlassian.crowd.directory.ldap.name.GenericConverter
All Implemented Interfaces:
Converter

public class GenericConverter
extends Object
implements Converter

See Converter interface for details.


Constructor Summary
GenericConverter()
           
 
Method Summary
static LdapName emptyLdapName()
           
 LdapName getName(String dn)
          Escapes and converts a DN into a Name, for use with LDAP through JNDI.
 LdapName getName(String attributeName, String objectName, LdapName baseDN)
          Returns a Name escaped for JNDI and LDAP, for use with a directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericConverter

public GenericConverter()
Method Detail

getName

public LdapName getName(String dn)
                 throws InvalidNameException
Description copied from interface: Converter
Escapes and converts a DN into a Name, for use with LDAP through JNDI.

Specified by:
getName in interface Converter
Returns:
Throws:
InvalidNameException

getName

public LdapName getName(String attributeName,
                        String objectName,
                        LdapName baseDN)
                 throws InvalidNameException
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 interface Converter
baseDN - A correctly-escaped DN. May be empty or null.
Returns:
Throws:
InvalidNameException

emptyLdapName

public static LdapName emptyLdapName()
Returns:
an empty LdapName, with no components


Copyright © 2012 Atlassian. All Rights Reserved.