Package com.netscape.cmsutil.ldap
Class LDAPUtil
- java.lang.Object
-
- com.netscape.cmsutil.ldap.LDAPUtil
-
public class LDAPUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSPECIAL_CHARS
-
Constructor Summary
Constructors Constructor Description LDAPUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringescapeFilter(java.lang.Object object)This method escapes special characters for LDAP filter (RFC 4515).static java.lang.StringescapeRDNValue(java.lang.Object value)This method escapes special characters for LDAP DN (RFC 1779).static java.lang.StringescapeRDNValue(java.lang.String value, boolean doubleEscape)static netscape.ldap.LDAPControlgetControl(java.lang.Class<? extends netscape.ldap.LDAPControl> cls, netscape.ldap.LDAPControl[] controls)Get the control of the specified class from the array of controls.
-
-
-
Method Detail
-
escapeFilter
public static java.lang.String escapeFilter(java.lang.Object object)
This method escapes special characters for LDAP filter (RFC 4515). Each special character will be replaced by a backslash followed by 2-digit hex of the ASCII code.- Parameters:
object- string to escape- Returns:
- escaped string
-
escapeRDNValue
public static java.lang.String escapeRDNValue(java.lang.Object value)
This method escapes special characters for LDAP DN (RFC 1779).
-
escapeRDNValue
public static java.lang.String escapeRDNValue(java.lang.String value, boolean doubleEscape)
-
getControl
public static netscape.ldap.LDAPControl getControl(java.lang.Class<? extends netscape.ldap.LDAPControl> cls, netscape.ldap.LDAPControl[] controls)Get the control of the specified class from the array of controls.- Returns:
- the LDAPControl, or null if not found
-
-