org.apache.shiro.realm.ldap
Class LdapUtils

java.lang.Object
  extended by org.apache.shiro.realm.ldap.LdapUtils

public final class LdapUtils
extends Object

Utility class providing static methods to make working with LDAP easier.

Since:
0.2

Constructor Summary
LdapUtils()
           
 
Method Summary
static void closeContext(LdapContext ctx)
          Closes an LDAP context, logging any errors, but not throwing an exception if there is a failure.
static void closeEnumeration(NamingEnumeration ne)
           
static Collection<String> getAllAttributeValues(Attribute attr)
          Helper method used to retrieve all attribute values from a particular context attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapUtils

public LdapUtils()
Method Detail

closeContext

public static void closeContext(LdapContext ctx)
Closes an LDAP context, logging any errors, but not throwing an exception if there is a failure.

Parameters:
ctx - the LDAP context to close.

getAllAttributeValues

public static Collection<String> getAllAttributeValues(Attribute attr)
                                                throws NamingException
Helper method used to retrieve all attribute values from a particular context attribute.

Parameters:
attr - the LDAP attribute.
Returns:
the values of the attribute.
Throws:
NamingException - if there is an LDAP error while reading the values.

closeEnumeration

public static void closeEnumeration(NamingEnumeration ne)


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.