org.jasig.cas.util
Class LdapUtils

java.lang.Object
  extended by org.jasig.cas.util.LdapUtils

public final class LdapUtils
extends java.lang.Object

Utilities related to LDAP functions.

Since:
3.0
Version:
$Revision: 48180 $ $Date: 2010-03-14 00:05:58 -0500 (Sun, 14 Mar 2010) $
Author:
Scott Battaglia

Method Summary
static void closeContext(javax.naming.directory.DirContext context)
          Close the given context and ignore any thrown exception.
static java.lang.String getFilterWithValues(java.lang.String filter, java.lang.String userName)
          Utility method to replace the placeholders in the filter with the proper values from the userName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFilterWithValues

public static java.lang.String getFilterWithValues(java.lang.String filter,
                                                   java.lang.String userName)
Utility method to replace the placeholders in the filter with the proper values from the userName.

Parameters:
filter -
userName -
Returns:
the filtered string populated with the username

closeContext

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

Parameters:
context - the Ldap context to close


Copyright © 2004-2010 Java Architectures Special Interest Group. All Rights Reserved.