public final class SpringLdapUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
LDAP_BOOLEAN_FALSE |
static String |
LDAP_BOOLEAN_TRUE |
static String |
OBJECTCLASS_ATTRIBUTE |
| Constructor and Description |
|---|
SpringLdapUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsObjectClass(org.springframework.ldap.core.DirContextAdapter ctx,
String objectclass)
Checks if the
objectclass Attribute of the DirContext contains the given objectclass |
static Boolean |
getBoolean(org.springframework.ldap.core.DirContextOperations ctx,
String attribute)
Reads a Boolean value from the DirContextAdapter
|
static Boolean |
getBoolean(org.springframework.ldap.core.DirContextOperations ctx,
String attribute,
Boolean nullValue)
Reads a Boolean value from the DirContextAdapter
|
static void |
setBoolean(org.springframework.ldap.core.DirContextOperations ctx,
String attribute,
Boolean value)
Sets the attribute
attribute to the boolean value |
public static final String OBJECTCLASS_ATTRIBUTE
public static final String LDAP_BOOLEAN_TRUE
public static final String LDAP_BOOLEAN_FALSE
public static Boolean getBoolean(org.springframework.ldap.core.DirContextOperations ctx, String attribute)
ctx - the DirContextAdapterattribute - the attribute nametrue if the attribute's value matches (case-insensitive) "true", otherwise falsepublic static Boolean getBoolean(org.springframework.ldap.core.DirContextOperations ctx, String attribute, Boolean nullValue)
ctx - the DirContextAdapterattribute - the attribute namenullValue - the value which sould be returing in case of a null valuetrue if the attribute's value matches (case-insensitive) "true", otherwise falsepublic static void setBoolean(org.springframework.ldap.core.DirContextOperations ctx,
String attribute,
Boolean value)
attribute to the boolean valuectx - the DirContextAdapterattribute - the attribute namevalue - the boolean valuepublic static boolean containsObjectClass(org.springframework.ldap.core.DirContextAdapter ctx,
String objectclass)
objectclass Attribute of the DirContext contains the given objectclassctx - the DirContextAdaper to checkobjectclass - the objectclass value to look for (case does not matter)true, if the DirContext contains the objectclass, otherwise falseCopyright © 2004-2012 Jasig. All Rights Reserved.