| | |
| | | * Directory. |
| | | * <p> |
| | | * The following are examples of string representations of DNs: |
| | | * |
| | | * |
| | | * <pre> |
| | | * UID=nobody@example.com,DC=example,DC=com CN=John |
| | | * Smith,OU=Sales,O=ACME Limited,L=Moab,ST=Utah,C=US |
| | | * </pre> |
| | | * |
| | | * |
| | | * @see <a href="http://tools.ietf.org/html/rfc4512#section-2.3">RFC |
| | | * 4512 - Lightweight Directory Access Protocol (LDAP): Directory |
| | | * Information Models </a> |
| | |
| | | /** |
| | | * Returns the Root DN. The Root DN does not contain and RDN |
| | | * components and is superior to all other DNs. |
| | | * |
| | | * |
| | | * @return The Root DN. |
| | | */ |
| | | public static DN rootDN() |
| | |
| | | /** |
| | | * Parses the provided LDAP string representation of a DN using the |
| | | * default schema. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The LDAP string representation of a DN. |
| | | * @return The parsed DN. |
| | |
| | | /** |
| | | * Parses the provided LDAP string representation of a DN using the |
| | | * provided schema. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The LDAP string representation of a DN. |
| | | * @param schema |
| | |
| | | /** |
| | | * Returns a DN which is subordinate to this DN and having the |
| | | * additional RDN components contained in the provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The DN containing the RDN components to be added to this |
| | | * DN. |
| | |
| | | /** |
| | | * Returns a DN which is an immediate child of this DN and having the |
| | | * specified RDN. |
| | | * |
| | | * |
| | | * @param rdn |
| | | * The RDN for the child DN. |
| | | * @return The child DN. |
| | |
| | | * Returns a DN which is subordinate to this DN and having the |
| | | * additional RDN components contained in the provided DN decoded |
| | | * using the default schema. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The DN containing the RDN components to be added to this |
| | | * DN. |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is an immediate child of the |
| | | * provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential parent DN. |
| | | * @return {@code true} if this DN is the immediate child of the |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is an immediate child of the |
| | | * provided DN decoded using the default schema. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential parent DN. |
| | | * @return {@code true} if this DN is the immediate child of the |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is the immediate parent of the |
| | | * provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential child DN. |
| | | * @return {@code true} if this DN is the immediate parent of the |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is the immediate parent of the |
| | | * provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential child DN. |
| | | * @return {@code true} if this DN is the immediate parent of the |
| | |
| | | |
| | | /** |
| | | * Returns {@code true} if this DN is the Root DN. |
| | | * |
| | | * |
| | | * @return {@code true} if this DN is the Root DN, otherwise {@code |
| | | * false}. |
| | | */ |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is subordinate to or equal to the |
| | | * provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential child DN. |
| | | * @return {@code true} if this DN is subordinate to or equal to the |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is subordinate to or equal to the |
| | | * provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential child DN. |
| | | * @return {@code true} if this DN is subordinate to or equal to the |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is superior to or equal to the |
| | | * provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential child DN. |
| | | * @return {@code true} if this DN is superior to or equal to the |
| | |
| | | /** |
| | | * Returns {@code true} if this DN is superior to or equal to the |
| | | * provided DN. |
| | | * |
| | | * |
| | | * @param dn |
| | | * The potential child DN. |
| | | * @return {@code true} if this DN is superior to or equal to the |
| | |
| | | * Attempts to remove RDNs using an iterator's {@code remove()} method |
| | | * are not permitted and will result in an {@code |
| | | * UnsupportedOperationException} being thrown. |
| | | * |
| | | * |
| | | * @return An iterator of the RDNs contained in this DN. |
| | | */ |
| | | public Iterator<RDN> iterator() |
| | |
| | | * null} if this DN is the Root DN. |
| | | * <p> |
| | | * This method is equivalent to: |
| | | * |
| | | * |
| | | * <pre> |
| | | * parent(1); |
| | | * </pre> |
| | | * |
| | | * |
| | | * @return The DN which is the immediate parent of this DN, or {@code |
| | | * null} if this DN is the Root DN. |
| | | */ |
| | |
| | | * Returns the DN which is equal to this DN with the specified number |
| | | * of RDNs removed. Note that if {@code index} is zero then this DN |
| | | * will be returned (identity). |
| | | * |
| | | * |
| | | * @param index |
| | | * The number of RDNs to be removed. |
| | | * @return The DN which is equal to this DN with the specified number |
| | |
| | | /** |
| | | * Returns the RDN of this DN, or {@code null} if this DN is the Root |
| | | * DN. |
| | | * |
| | | * |
| | | * @return The RDN of this DN, or {@code null} if this DN is the Root |
| | | * DN. |
| | | */ |
| | |
| | | |
| | | /** |
| | | * Returns the number of RDN components in this DN. |
| | | * |
| | | * |
| | | * @return The number of RDN components in this DN. |
| | | */ |
| | | public int size() |
| | | { |
| | | return size(); |
| | | return size; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Returns the normalized string representation of this DN. |
| | | * |
| | | * |
| | | * @return The normalized string representation of this DN. |
| | | */ |
| | | public String toNormalizedString() |
| | |
| | | |
| | | /** |
| | | * Returns the RFC 4514 string representation of this DN. |
| | | * |
| | | * |
| | | * @return The RFC 4514 string representation of this DN. |
| | | * @see <a href="http://tools.ietf.org/html/rfc4514">RFC 4514 - |
| | | * Lightweight Directory Access Protocol (LDAP): String |