mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
18.15.2013 2d1f8c42537cea37b9493571eadb6bb2fc1ed36b
DN.java:
In toNormalizedString(), complemented the javadoc.
Comments => javadocs.
1 files modified
37 ■■■■ changed files
opends/src/server/org/opends/server/types/DN.java 37 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/types/DN.java
@@ -23,12 +23,10 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2012 ForgeRock AS
 *      Portions Copyright 2012-2013 ForgeRock AS
 */
package org.opends.server.types;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
@@ -43,7 +41,6 @@
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
/**
 * This class defines a data structure for storing and interacting
 * with the distinguished names associated with entries in the
@@ -90,17 +87,19 @@
  // The number of RDN components that comprise this DN.
  /** The number of RDN components that comprise this DN. */
  private final int numComponents;
  // The set of RDN components that comprise this DN, arranged with
  // the suffix as the last element.
  /**
   * The set of RDN components that comprise this DN, arranged with the suffix
   * as the last element.
   */
  private final RDN[] rdnComponents;
  // The string representation of this DN.
  /** The string representation of this DN. */
  private String dnString;
  // The normalized string representation of this DN.
  /** The normalized string representation of this DN. */
  private String normalizedDN;
@@ -2797,7 +2796,25 @@
  /**
   * Retrieves a normalized string representation of this DN.
   * Retrieves a normalized string representation of this DN. This method should
   * be used over {@link #toString()} when the resulting String is to be used as
   * a key in a Map.
   * <p>
   * Normalization involves:
   * <ol>
   * <li>sorting AVAs (e.g. "sn=swift+cn=matt" is greater than
   * "cn=matt+sn=swift")</li>
   * <li>normalizing attribute names (e.g. "commonName" is converted to "cn")</li>
   * <li>normalizing attribute values (e.g. converting to lowercase)</li>
   * </ol>
   * Where AVA stands for "Attribute Value Assertion".
   * <p>
   * Remember that:
   * <ul>
   * <li>a DN is made of one or several RDNs</li>
   * <li>an RDN is made of one or several AVA</li>
   * <li>an AVA is a attribute type and an attribute value</li>
   * </ul>
   *
   * @return  A normalized string representation of this DN.
   */