edu.internet2.middleware.grouperClient.util
Class GrouperClientLdapUtils

java.lang.Object
  extended by edu.internet2.middleware.grouperClient.util.GrouperClientLdapUtils

public class GrouperClientLdapUtils
extends Object

Author:
mchyzer

Field Summary
static File lastDiscoveryConfigFile
          cache this so we know if we need to reconfigure
static String LDAP_FAILOVER_CONFIG_NAME
          readonly failover config name
 
Constructor Summary
GrouperClientLdapUtils()
           
 
Method Summary
static void configureFailoverClient()
          configure the failover client every so often
static void printAttribute(Attribute attribute)
           
static void printAttributes(Attributes attributes)
          print attributes
static void printNamingEnumeration(NamingEnumeration<?> namingEnumeration)
          print out a naming enumeration
static List<String> retrieveAttributeStringListValue(Object object, String attributeName)
          retrieve a string array of values
static String retrieveAttributeStringValue(Object object, String attributeName)
          retrieve a single valued attribute as string
static DirContext retrieveContext(String ldapUrl)
          retrieve dircontext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LDAP_FAILOVER_CONFIG_NAME

public static final String LDAP_FAILOVER_CONFIG_NAME
readonly failover config name

See Also:
Constant Field Values

lastDiscoveryConfigFile

public static File lastDiscoveryConfigFile
cache this so we know if we need to reconfigure

Constructor Detail

GrouperClientLdapUtils

public GrouperClientLdapUtils()
Method Detail

retrieveContext

public static DirContext retrieveContext(String ldapUrl)
retrieve dircontext

Parameters:
ldapUrl -
Returns:
the context

printAttributes

public static void printAttributes(Attributes attributes)
                            throws NamingException
print attributes

Parameters:
attributes -
Throws:
NamingException

printNamingEnumeration

public static void printNamingEnumeration(NamingEnumeration<?> namingEnumeration)
                                   throws NamingException
print out a naming enumeration

Parameters:
namingEnumeration -
Throws:
NamingException

retrieveAttributeStringValue

public static String retrieveAttributeStringValue(Object object,
                                                  String attributeName)
                                           throws NamingException
retrieve a single valued attribute as string

Parameters:
object -
attributeName -
Returns:
the attribute value or null if not there
Throws:
NamingException

retrieveAttributeStringListValue

public static List<String> retrieveAttributeStringListValue(Object object,
                                                            String attributeName)
                                                     throws NamingException
retrieve a string array of values

Parameters:
object -
attributeName -
Returns:
the attribute value or null if not there
Throws:
NamingException

printAttribute

public static void printAttribute(Attribute attribute)
                           throws NamingException
Parameters:
attribute -
Throws:
NamingException

configureFailoverClient

public static void configureFailoverClient()
configure the failover client every so often