public class LDAPDN
extends java.lang.Object
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.
| Constructor and Description |
|---|
LDAPDN() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(java.lang.String dn1,
java.lang.String dn2)
Compares two dn's for equality.
|
static java.lang.String |
escapeRDN(java.lang.String rdn)
Returns the RDN after escaping the characters specified
by
netscape.ldap.util.DN.ESCAPED_CHAR. |
static java.lang.String[] |
explodeDN(java.lang.String dn,
boolean noTypes)
Returns the individual components of a distinguished name (DN).
|
static java.lang.String[] |
explodeRDN(java.lang.String rdn,
boolean noTypes)
Returns the individual components of a relative distinguished name (RDN).
|
static java.lang.String |
normalize(java.lang.String dn)
Normalizes the dn.
|
static java.lang.String |
unEscapeRDN(java.lang.String rdn)
Returns the RDN after unescaping any escaped characters.
|
public static java.lang.String[] explodeDN(java.lang.String dn,
boolean noTypes)
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=')explodeRDN(java.lang.String, boolean)public static java.lang.String[] explodeRDN(java.lang.String rdn,
boolean noTypes)
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=')explodeDN(java.lang.String, boolean)public static java.lang.String escapeRDN(java.lang.String rdn)
netscape.ldap.util.DN.ESCAPED_CHAR.
rdn - the RDN to escapeDN.ESCAPED_CHAR,
unEscapeRDN(java.lang.String)public static java.lang.String unEscapeRDN(java.lang.String rdn)
netscape.ldap.LDAPDN.ESCAPED_CHAR.
rdn - the RDN to unescapeDN.ESCAPED_CHAR,
escapeRDN(java.lang.String)public static java.lang.String normalize(java.lang.String dn)
dn - the DN to normalizepublic static boolean equals(java.lang.String dn1,
java.lang.String dn2)
dn1 - the first dn to comparedn2 - the second dn to compare