LdapName
implements compound names for LDAP v3 as specified by RFC 2253. RFC 2253 has a few ambiguities and outright inconsistencies. These are resolved as follows:
String names passed to LdapName
or returned by it use the full 16-bit Unicode character set. They may also contain characters encoded into UTF-8 with each octet represented by a three-character substring such as "\\B4". They may not, however, contain characters encoded into UTF-8 with each octet represented by a single character in the string: the meaning would be ambiguous.
LdapName
will properly parse all valid names, but does not attempt to detect all possible violations when parsing invalid names. It's "generous".
When names are tested for equality, attribute types and binary values are case-insensitive, and string values are by default case-insensitive. String values with different but equivalent usage of quoting, escaping, or UTF8-hex-encoding are considered equal. The order of components in multi-valued RDNs (such as "ou=Sales+cn=Bob") is not significant. @author Scott Seligman
This class resolves a few ambiguities found in RFC 2253 as follows:
String names passed to LdapName
or returned by it use the full Unicode character set. They may also contain characters encoded into UTF-8 with each octet represented by a three-character substring such as "\\B4". They may not, however, contain characters encoded into UTF-8 with each octet represented by a single character in the string: the meaning would be ambiguous.
LdapName
will properly parse all valid names, but does not attempt to detect all possible violations when parsing invalid names. It is "generous" in accepting invalid names. The "validity" of a name is determined ultimately when it is supplied to an LDAP server, which may accept or reject the name based on factors such as its schema information and interoperability considerations.
When names are tested for equality, attribute types, both binary and string values, are case-insensitive. String values with different but equivalent usage of quoting, escaping, or UTF8-hex-encoding are considered equal. The order of components in multi-valued RDNs (such as "ou=Sales+cn=Bob") is not significant.
The components of a LDAP name, that is, RDNs, are numbered. The indexes of a LDAP name with n RDNs range from 0 to n-1. This range may be written as [0,n). The right most RDN is at index 0, and the left most RDN is at index n-1. For example, the distinguished name: "CN=Steve Kille, O=Isode Limited, C=GB" is numbered in the following sequence ranging from 0 to 2: {C=GB, O=Isode Limited, CN=Steve Kille}. An empty LDAP name is represented by an empty RDN list.
Concurrent multithreaded read-only access of an instance of LdapName need not be synchronized.
Unless otherwise noted, the behavior of passing a null argument to a constructor or method in this class will cause a NullPointerException to be thrown. @author Scott Seligman @since 1.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|