public class LdapUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
addBinaryOption(String ldapAttrName)
Adds the binary option to the attribute if not present already.
|
static void |
addStringAttrValues(Attributes ldapAttrs,
String ldapAttrName,
Set<String> toSet) |
static boolean |
attrNameEquals(String name1,
String name2)
Returns true if the names of the given LDAP attributes are equal.
|
static <T> List<T> |
checkedListByFilter(List list,
Class<T> clazz) |
static boolean |
escapeAttrValue(Object value,
StringBuilder toBuilder)
Escapes the given attribute value to the given
StringBuilder. |
static String |
getStringAttrValue(Attributes ldapAttrs,
String ldapAttrName)
Return the value of the
ldapAttrName parameter cast to a String. |
static Set<String> |
getStringAttrValues(Attributes ldapAttrs,
String ldapAttrName)
Return the case insensitive set of values of the
ldapAttrName parameter cast to a String. |
static boolean |
hasBinaryOption(String ldapAttrName)
Returns
true if the attribute has the binary option,
e.g., userCertificate;binary. |
static boolean |
isUnderContexts(LdapName entry,
List<LdapName> contexts) |
static String[] |
nullAsEmpty(String[] array) |
static LdapName |
quietCreateLdapName(String ldapName) |
static String |
removeBinaryOption(String ldapAttrName)
Removes the binary option from the attribute.
|
public static boolean attrNameEquals(String name1, String name2)
public static boolean hasBinaryOption(String ldapAttrName)
true if the attribute has the binary option,
e.g., userCertificate;binary.public static String addBinaryOption(String ldapAttrName)
public static String removeBinaryOption(String ldapAttrName)
public static String getStringAttrValue(Attributes ldapAttrs, String ldapAttrName)
ldapAttrName parameter cast to a String.public static Set<String> getStringAttrValues(Attributes ldapAttrs, String ldapAttrName)
ldapAttrName parameter cast to a String.public static void addStringAttrValues(Attributes ldapAttrs, String ldapAttrName, Set<String> toSet)
public static boolean escapeAttrValue(Object value, StringBuilder toBuilder)
StringBuilder.
Returns true iff anything was written to the builder.Copyright © 2014. All Rights Reserved.