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 java.lang.Object
implements Converter

See Converter interface for details.


Constructor Summary
GenericConverter(Encoder encoder)
           
 
Method Summary
 javax.naming.Name getName(java.lang.String dn)
          Escapes and converts a DN into a Name, for use with LDAP through JNDI.
 javax.naming.Name getName(java.lang.String attributeName, java.lang.String objectName, javax.naming.Name 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(Encoder encoder)
Method Detail

getName

public javax.naming.Name getName(java.lang.String dn)
                          throws javax.naming.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:
javax.naming.InvalidNameException

getName

public javax.naming.Name getName(java.lang.String attributeName,
                                 java.lang.String objectName,
                                 javax.naming.Name baseDN)
                          throws javax.naming.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
Returns:
Throws:
javax.naming.InvalidNameException


Copyright © 2010 Atlassian. All Rights Reserved.