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

Matthew Swift
16.43.2011 5af30c2b6e071cc0c857d122f9cdb6821bb365ff
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/schema/SchemaCompatOptions.java
@@ -67,6 +67,8 @@
  private boolean allowZeroLengthDirectoryStrings = false;
  private boolean allowMalformedNamesAndOptions = false;
  // Prevent direct instantiation.
@@ -78,6 +80,58 @@
  /**
   * Returns {@code true} if the schema should allow certain illegal characters
   * in OIDs and attribute options. When this compatibility option is set to
   * {@code true} the following illegal characters will be permitted:
   *
   * <pre>
   * USCORE  = %x5F ; underscore ("_")
   * DOT     = %x2E ; period (".")
   * </pre>
   *
   * By default this compatibility option is set to {@code false}.
   *
   * @return {@code true} if the schema should allow certain illegal characters
   *         in OIDs and attribute options.
   * @see <a href="http://tools.ietf.org/html/rfc4512">RFC 4512 - Lightweight
   *      Directory Access Protocol (LDAP): Directory Information Models </a>
   */
  public boolean allowMalformedNamesAndOptions()
  {
    return allowMalformedNamesAndOptions;
  }
  /**
   * Specifies whether or not the schema should allow certain illegal characters
   * in OIDs and attribute options. When this compatibility option is set to
   * {@code true} the following illegal characters will be permitted:
   *
   * <pre>
   * USCORE  = %x5F ; underscore ("_")
   * DOT     = %x2E ; period (".")
   * </pre>
   *
   * By default this compatibility option is set to {@code false}.
   *
   * @param allowMalformedNamesAndOptions
   *          {@code true} if the schema should allow certain illegal characters
   *          in OIDs and attribute options.
   * @return A reference to this {@code SchemaCompatOptions}.
   * @see <a href="http://tools.ietf.org/html/rfc4512">RFC 4512 - Lightweight
   *      Directory Access Protocol (LDAP): Directory Information Models </a>
   */
  public SchemaCompatOptions allowMalformedNamesAndOptions(
      final boolean allowMalformedNamesAndOptions)
  {
    this.allowMalformedNamesAndOptions = allowMalformedNamesAndOptions;
    return this;
  }
  /**
   * Returns {@code true} if the Telephone Number syntax should allow values
   * which do not conform to the E.123 international telephone number format.
   * <p>
@@ -160,10 +214,10 @@
  // Assigns the provided options to this set of options.
  SchemaCompatOptions assign(final SchemaCompatOptions options)
  {
    return allowNonStandardTelephoneNumbers(
        options.allowNonStandardTelephoneNumbers)
        .allowZeroLengthDirectoryStrings(
            options.allowNonStandardTelephoneNumbers);
    this.allowMalformedNamesAndOptions = options.allowMalformedNamesAndOptions;
    this.allowNonStandardTelephoneNumbers =options.allowNonStandardTelephoneNumbers;
    this.allowZeroLengthDirectoryStrings = options.allowZeroLengthDirectoryStrings;
    return this;
  }
}