netscape.ldap
Class LDAPDN
public class LDAPDN
extends java.lang.Object
Represents a distinguished name in LDAP.
You can use objects of this class to split a distinguished name
(DN) into its individual components. You can also escape the
characters in a DN.
static boolean | equals(String dn1, String dn2)- Compares two dn's for equality.
|
static String | escapeRDN(String rdn)- Returns the RDN after escaping the characters specified
by
netscape.ldap.util.DN.ESCAPED_CHAR.
|
static String[] | explodeDN(String dn, boolean noTypes)- Returns the individual components of a distinguished name (DN).
|
static String[] | explodeRDN(String rdn, boolean noTypes)- Returns the individual components of a relative distinguished name (RDN).
|
static String | normalize(String dn)- Normalizes the dn.
|
static String | unEscapeRDN(String rdn)- Returns the RDN after unescaping any escaped characters.
|
equals
public static boolean equals(String dn1,
String dn2) Compares two dn's for equality.
dn1 - the first dn to comparedn2 - the second dn to compare
- true if the two dn's are equal
escapeRDN
public static String escapeRDN(String rdn)
Returns the RDN after escaping the characters specified
by
netscape.ldap.util.DN.ESCAPED_CHAR.
rdn - the RDN to escape
- the RDN with the characters escaped.
DN.ESCAPED_CHAR, netscape.ldap.LDAPDN.unEscapeRDN(java.lang.String)
explodeDN
public static String[] explodeDN(String dn,
boolean noTypes) Returns the individual components of a distinguished name (DN).
dn - distinguished name of which you want to get the components.noTypes - if true, returns only the values of the
components and not the names (such as 'cn=')
- an array of strings representing the components of the DN.
netscape.ldap.LDAPDN.explodeRDN(java.lang.String, boolean)
explodeRDN
public static String[] explodeRDN(String rdn,
boolean noTypes) Returns the individual components of a relative distinguished name (RDN).
rdn - relative distinguished name of which you want to get the components.noTypes - if true, returns only the values of the
components and not the names (such as 'cn=')
- an array of strings representing the components of the RDN.
netscape.ldap.LDAPDN.explodeDN(java.lang.String, boolean)
normalize
public static String normalize(String dn)
Normalizes the dn.
dn - the DN to normalize
- the normalized DN
unEscapeRDN
public static String unEscapeRDN(String rdn)
Returns the RDN after unescaping any escaped characters.
For a list of characters that are typically escaped in a
DN, see
netscape.ldap.LDAPDN.ESCAPED_CHAR.
rdn - the RDN to unescape
- the unescaped RDN.
DN.ESCAPED_CHAR, netscape.ldap.LDAPDN.escapeRDN(java.lang.String)