Package netscape.ldap
Class LDAPDN
java.lang.Object
netscape.ldap.LDAPDN
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.
- Version:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCompares two dn's for equality.static StringReturns the RDN after escaping the characters specified bynetscape.ldap.util.DN.ESCAPED_CHAR.static String[]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).private static booleanisEscape(char c) static StringNormalizes the dn.static StringunEscapeRDN(String rdn) Returns the RDN after unescaping any escaped characters.
-
Constructor Details
-
LDAPDN
public LDAPDN()
-
-
Method Details
-
explodeDN
Returns the individual components of a distinguished name (DN).- Parameters:
dn- distinguished name of which you want to get the components.noTypes- iftrue, returns only the values of the components and not the names (such as 'cn=')- Returns:
- an array of strings representing the components of the DN.
- See Also:
-
explodeRDN
Returns the individual components of a relative distinguished name (RDN).- Parameters:
rdn- relative distinguished name of which you want to get the components.noTypes- iftrue, returns only the values of the components and not the names (such as 'cn=')- Returns:
- an array of strings representing the components of the RDN.
- See Also:
-
escapeRDN
Returns the RDN after escaping the characters specified bynetscape.ldap.util.DN.ESCAPED_CHAR.- Parameters:
rdn- the RDN to escape- Returns:
- the RDN with the characters escaped.
- See Also:
-
unEscapeRDN
Returns the RDN after unescaping any escaped characters. For a list of characters that are typically escaped in a DN, seenetscape.ldap.LDAPDN.ESCAPED_CHAR.- Parameters:
rdn- the RDN to unescape- Returns:
- the unescaped RDN.
- See Also:
-
normalize
Normalizes the dn.- Parameters:
dn- the DN to normalize- Returns:
- the normalized DN
-
equals
Compares two dn's for equality.- Parameters:
dn1- the first dn to comparedn2- the second dn to compare- Returns:
- true if the two dn's are equal
-
isEscape
private static boolean isEscape(char c)
-