Package com.netscape.cmsutil.ldap
Class LDAPUtil
java.lang.Object
com.netscape.cmsutil.ldap.LDAPUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
escapeFilter
(Object object) This method escapes special characters for LDAP filter (RFC 4515).static String
escapeRDNValue
(Object value) This method escapes special characters for LDAP DN (RFC 1779).static String
escapeRDNValue
(String value, boolean doubleEscape) static netscape.ldap.LDAPControl
getControl
(Class<? extends netscape.ldap.LDAPControl> cls, netscape.ldap.LDAPControl[] controls) Get the control of the specified class from the array of controls.
-
Field Details
-
SPECIAL_CHARS
-
-
Constructor Details
-
LDAPUtil
public LDAPUtil()
-
-
Method Details
-
escapeFilter
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
This method escapes special characters for LDAP DN (RFC 1779). -
escapeRDNValue
-
getControl
public static netscape.ldap.LDAPControl getControl(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
-