org.springframework.ldap.support
Class LdapUtils

java.lang.Object
  extended by org.springframework.ldap.support.LdapUtils

public final class LdapUtils
extends java.lang.Object

Generic utility methods for working with LDAP. Mainly for internal use within the framework, but also useful for custom code.

Since:
1.2
Author:
Ulrik Sandberg

Method Summary
static void closeContext(javax.naming.directory.DirContext context)
          Close the given JNDI Context and ignore any thrown exception.
static NamingException convertLdapException(javax.naming.NamingException ex)
          Convert the specified checked NamingException to a Spring LDAP runtime NamingException equivalent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

closeContext

public static void closeContext(javax.naming.directory.DirContext context)
Close the given JNDI Context and ignore any thrown exception. This is useful for typical finally blocks in JNDI code.

Parameters:
context - the JNDI Context to close (may be null)

convertLdapException

public static NamingException convertLdapException(javax.naming.NamingException ex)
Convert the specified checked NamingException to a Spring LDAP runtime NamingException equivalent.

Parameters:
ex - the original checked NamingException to convert
Returns:
the Spring LDAP runtime NamingException wrapping the given exception


Copyright � 2002-2006. All Rights Reserved.