Class LDAPUtil

java.lang.Object
com.netscape.cmsutil.ldap.LDAPUtil

public class LDAPUtil extends Object
  • Field Details

    • SPECIAL_CHARS

      public static String SPECIAL_CHARS
  • Constructor Details

    • LDAPUtil

      public LDAPUtil()
  • Method Details

    • escapeFilter

      public static String escapeFilter(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 String escapeRDNValue(Object value)
      This method escapes special characters for LDAP DN (RFC 1779).
    • escapeRDNValue

      public static String escapeRDNValue(String value, boolean doubleEscape)
    • 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