Class LDAPDN
java.lang.Object
com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPDN
This class provides a set of utility methods for working with LDAP DNs.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, the
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, the
DN class should be
used instead.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanIndicates whether the provided strings represent the same distinguished name.static String[]Explodes the provided DN into individual RDN components.static String[]explodeRDN(String rdn, boolean noTypes) Explodes the provided RDN into individual name-value pairs.static StringRetrieves a normalized representation of the provided DN.
-
Method Details
-
normalize
Retrieves a normalized representation of the provided DN. If the provided string does not represent a valid distinguished name, then the value returned by this method will not be reliable.- Parameters:
dn- The string representation of the DN to be normalized.- Returns:
- A normalized representation of the provided DN.
-
explodeDN
Explodes the provided DN into individual RDN components. If the provided string does not represent a valid distinguished name, then the value returned by this method will not be reliable.- Parameters:
dn- The DN to be exploded into its RDN components.noTypes- Indicates whether to exclude the attribute names and equal signs and only include the values of the RDN components.- Returns:
- An exploded representation of the provided DN.
-
explodeRDN
Explodes the provided RDN into individual name-value pairs. If the provided string does not represent a valid relative distinguished name, then the value returned by this method will not be reliable.- Parameters:
rdn- The RDN to be exploded into its name-value pairs.noTypes- Indicates whether to exclude the attribute names and equal signs and only include the values of the components.- Returns:
- An exploded representation of the provided DN.
-
equals
Indicates whether the provided strings represent the same distinguished name.- Parameters:
dn1- The first DN to be compared.dn2- The second DN to be compared.- Returns:
trueif the provided strings represent the same distinguished name, orfalseif not or if either of the values cannot be parsed as a valid DN.
-