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

neil_a_wilson
25.19.2007 03bbaa5fcbf6a65c1f7347fa3c189d08f79c060f
Migrate the attribute syntax configuration to the admin framework.
4 files added
56 files modified
2383 ■■■■■ changed files
opends/src/admin/defn/org/opends/server/admin/std/AttributeSyntaxConfiguration.xml 90 ●●●●● patch | view | raw | blame | history
opends/src/admin/defn/org/opends/server/admin/std/DirectoryStringAttributeSyntaxConfiguration.xml 73 ●●●●● patch | view | raw | blame | history
opends/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml 13 ●●●●● patch | view | raw | blame | history
opends/src/admin/defn/org/opends/server/admin/std/TelephoneNumberAttributeSyntaxConfiguration.xml 70 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/admin/server/DNBuilder.java 3 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/api/AttributeSyntax.java 14 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java 492 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/DirectoryServer.java 30 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/SchemaConfigManager.java 229 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/messages/ConfigMessages.java 28 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java 20 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/AciSyntax.java 16 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java 8 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/BinarySyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/BitStringSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/BooleanSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/CertificateListSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/CertificatePairSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/CertificateSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/CountryStringSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java 7 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java 7 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java 236 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java 16 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java 20 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/FaxNumberSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/FaxSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java 16 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/GuideSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/IA5StringSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/IntegerSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/JPEGSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java 16 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java 17 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java 7 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java 17 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/NameFormSyntax.java 8 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/NumericStringSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/OIDSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/ObjectClassSyntax.java 8 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/OctetStringSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/PostalAddressSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/PrintableStringSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java 21 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java 25 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java 249 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/TelexNumberSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/UTCTimeSyntax.java 17 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/UUIDSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/UserPasswordSyntax.java 19 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java 6 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/schema/ConfigurableAttributeSyntaxTest.java 53 ●●●●● patch | view | raw | blame | history
opends/src/admin/defn/org/opends/server/admin/std/AttributeSyntaxConfiguration.xml
New file
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License").  You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
!      Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
!
!      Portions Copyright 2007 Sun Microsystems, Inc.
! -->
<adm:managed-object name="attribute-syntax"
plural-name="attribute-syntaxes"
package="org.opends.server.admin.std" abstract="false"
xmlns:adm="http://www.opends.org/admin"
xmlns:ldap="http://www.opends.org/admin-ldap">
  <adm:synopsis>
    <adm:user-friendly-plural-name />
    define the type of data that may be stored in an attribute with that syntax.
    A syntax is generally associated with a set of matching rules that indicate
    how to perform matching operations against values of that syntax.
  </adm:synopsis>
  <adm:tag name="core"/>
  <adm:profile name="ldap">
    <ldap:object-class>
      <ldap:oid>1.3.6.1.4.1.26027.1.2.3</ldap:oid>
      <ldap:name>ds-cfg-attribute-syntax</ldap:name>
      <ldap:superior>top</ldap:superior>
    </ldap:object-class>
  </adm:profile>
  <adm:property name="enabled" mandatory="true">
    <adm:synopsis>
      Indicate whether the
      <adm:user-friendly-name />
      is enabled for use.
    </adm:synopsis>
    <adm:syntax>
      <adm:boolean />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:oid>1.3.6.1.4.1.26027.1.1.125</ldap:oid>
        <ldap:name>ds-cfg-syntax-enabled</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="syntax-class" mandatory="true">
    <adm:synopsis>
      The fully-qualified name of the Java class that provides the
      <adm:user-friendly-name />
      implementation.
    </adm:synopsis>
    <adm:syntax>
      <adm:java-class>
        <adm:instance-of>
          org.opends.server.api.AttributeSyntax
        </adm:instance-of>
      </adm:java-class>
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:oid>1.3.6.1.4.1.26027.1.1.124</ldap:oid>
        <ldap:name>ds-cfg-syntax-class</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
</adm:managed-object>
opends/src/admin/defn/org/opends/server/admin/std/DirectoryStringAttributeSyntaxConfiguration.xml
New file
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License").  You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
!      Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
!
!      Portions Copyright 2007 Sun Microsystems, Inc.
! -->
<adm:managed-object name="directory-string-attribute-syntax"
plural-name="directory-string-attribute-syntaxes"
extends="attribute-syntax"
package="org.opends.server.admin.std" abstract="false"
xmlns:adm="http://www.opends.org/admin"
xmlns:ldap="http://www.opends.org/admin-ldap">
  <adm:synopsis>
    <adm:user-friendly-plural-name />
    define an attribute syntax for storing arbitrary string (and sometimes
    binary) data.
  </adm:synopsis>
  <adm:profile name="ldap">
    <ldap:object-class>
      <ldap:oid>1.3.6.1.4.1.26027.1.2.53</ldap:oid>
      <ldap:name>ds-cfg-directory-string-attribute-syntax</ldap:name>
      <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
    </ldap:object-class>
  </adm:profile>
  <adm:property name="allow-zero-length-values" mandatory="false">
    <adm:synopsis>
      Indicate whether zero-length (i.e., empty string) values will be allowed.
      This is technically not allowed by the revised LDAPv3 specification, but
      some environments may require it for backward compatibility with servers
      that did allow it.
    </adm:synopsis>
    <adm:default-behavior>
      <adm:defined>
        <adm:value>false</adm:value>
      </adm:defined>
    </adm:default-behavior>
    <adm:syntax>
      <adm:boolean />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:oid>1.3.6.1.4.1.26027.1.1.140</ldap:oid>
        <ldap:name>ds-cfg-allow-zero-length-values</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
</adm:managed-object>
opends/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml
@@ -321,6 +321,19 @@
      </cli:relation>
    </adm:profile>
  </adm:relation>
  <adm:relation name="attribute-syntax">
    <adm:one-to-many />
    <adm:profile name="ldap">
      <ldap:rdn-sequence>
        cn=Syntaxes,cn=config
      </ldap:rdn-sequence>
    </adm:profile>
    <adm:profile name="cli">
      <cli:relation>
        <cli:default-property name="enabled" />
      </cli:relation>
    </adm:profile>
  </adm:relation>
  <adm:product-name>OpenDS Directory Server</adm:product-name>
  <adm:tag-definition name="logging">
    <adm:synopsis>Logging</adm:synopsis>
opends/src/admin/defn/org/opends/server/admin/std/TelephoneNumberAttributeSyntaxConfiguration.xml
New file
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License").  You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
!      Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
!
!      Portions Copyright 2007 Sun Microsystems, Inc.
! -->
<adm:managed-object name="telephone-number-attribute-syntax"
plural-name="telephone-number-attribute-syntaxes"
extends="attribute-syntax"
package="org.opends.server.admin.std" abstract="false"
xmlns:adm="http://www.opends.org/admin"
xmlns:ldap="http://www.opends.org/admin-ldap">
  <adm:synopsis>
    <adm:user-friendly-plural-name />
    define an attribute syntax for storing telephone number information.
  </adm:synopsis>
  <adm:profile name="ldap">
    <ldap:object-class>
      <ldap:oid>1.3.6.1.4.1.26027.1.2.4</ldap:oid>
      <ldap:name>ds-cfg-telephone-number-attribute-syntax</ldap:name>
      <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
    </ldap:object-class>
  </adm:profile>
  <adm:property name="strict-format" mandatory="false">
    <adm:synopsis>
      Indicates whether to require telephone number values to strictly comply
      with the standard definition for this syntax.
    </adm:synopsis>
    <adm:default-behavior>
      <adm:defined>
        <adm:value>false</adm:value>
      </adm:defined>
    </adm:default-behavior>
    <adm:syntax>
      <adm:boolean />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:oid>1.3.6.1.4.1.26027.1.1.121</ldap:oid>
        <ldap:name>ds-cfg-strict-telephone-number-format</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
</adm:managed-object>
opends/src/server/org/opends/server/admin/server/DNBuilder.java
@@ -132,7 +132,8 @@
    // Now add the single RDN representing the named instance.
    String type = profile.getInstantiableRelationChildRDNType(r);
    AttributeType atype = DirectoryServer.getAttributeType(type.toLowerCase());
    AttributeType atype = DirectoryServer.getAttributeType(type.toLowerCase(),
                                                           true);
    AttributeValue avalue = new AttributeValue(atype, name);
    dn = dn.concat(RDN.create(atype, avalue));
  }
opends/src/server/org/opends/server/api/AttributeSyntax.java
@@ -28,7 +28,7 @@
import org.opends.server.config.ConfigEntry;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ByteString;
import org.opends.server.types.InitializationException;
@@ -39,16 +39,18 @@
 * This class defines the set of methods and structures that must be
 * implemented by a Directory Server module that implements an
 * attribute syntax.
 *
 * @param  <T>  The type of configuration handled by this attribute
 *              syntax.
 */
public abstract class AttributeSyntax
public abstract class AttributeSyntax<T extends AttributeSyntaxCfg>
{
  /**
   * Initializes this attribute syntax based on the information in the
   * provided configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the
   *                      information to use to initialize this
   *                      attribute syntax.
   * @param  configuration  The configuration to use to initialize
   *                        this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in
   *                           the process of performing the
@@ -59,7 +61,7 @@
   *                                   related to the server
   *                                   configuration.
   */
  public abstract void initializeSyntax(ConfigEntry configEntry)
  public abstract void initializeSyntax(T configuration)
         throws ConfigException, InitializationException;
opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
New file
@@ -0,0 +1,492 @@
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License, Version 1.0 only
 * (the "License").  You may not use this file except in compliance
 * with the License.
 *
 * You can obtain a copy of the license at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 * add the following below this CDDL HEADER, with the fields enclosed
 * by brackets "[]" replaced with your own identifying information:
 *      Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 */
package org.opends.server.core;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import org.opends.server.admin.ClassPropertyDefinition;
import org.opends.server.admin.server.ConfigurationAddListener;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.server.ConfigurationDeleteListener;
import org.opends.server.admin.std.meta.AttributeSyntaxCfgDefn;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.admin.std.server.RootCfg;
import org.opends.server.admin.server.ServerManagementContext;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.config.ConfigException;
import org.opends.server.types.AttributeType;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
/**
 * This class defines a utility that will be used to manage the set of attribute
 * syntaxes defined in the Directory Server.  It wil initialize the syntaxes
 * when the server starts, and then will manage any additions, removals, or
 * modifications to any syntaxes while the server is running.
 */
public class AttributeSyntaxConfigManager
       implements ConfigurationChangeListener<AttributeSyntaxCfg>,
                  ConfigurationAddListener<AttributeSyntaxCfg>,
                  ConfigurationDeleteListener<AttributeSyntaxCfg>
{
  // A mapping between the DNs of the config entries and the associated
  // attribute syntaxes.
  private ConcurrentHashMap<DN,AttributeSyntax> syntaxes;
  /**
   * Creates a new instance of this attribute syntax config manager.
   */
  public AttributeSyntaxConfigManager()
  {
    syntaxes = new ConcurrentHashMap<DN,AttributeSyntax>();
  }
  /**
   * Initializes all attribute syntaxes currently defined in the Directory
   * Server configuration.  This should only be called at Directory Server
   * startup.
   *
   * @throws  ConfigException  If a configuration problem causes the attribute
   *                           syntax initialization process to fail.
   *
   * @throws  InitializationException  If a problem occurs while initializing
   *                                   the attribute syntaxes that is not
   *                                   related to the server configuration.
   */
  public void initializeAttributeSyntaxes()
         throws ConfigException, InitializationException
  {
    // Get the root configuration object.
    ServerManagementContext managementContext =
         ServerManagementContext.getInstance();
    RootCfg rootConfiguration =
         managementContext.getRootConfiguration();
    // Register as an add and delete listener with the root configuration so we
    // can be notified if any attribute syntax entries are added or removed.
    rootConfiguration.addAttributeSyntaxAddListener(this);
    rootConfiguration.addAttributeSyntaxDeleteListener(this);
    //Initialize the existing attribute syntaxes.
    for (String name : rootConfiguration.listAttributeSyntaxes())
    {
      AttributeSyntaxCfg syntaxConfiguration =
           rootConfiguration.getAttributeSyntax(name);
      syntaxConfiguration.addChangeListener(this);
      if (syntaxConfiguration.isEnabled())
      {
        String className = syntaxConfiguration.getSyntaxClass();
        try
        {
          AttributeSyntax syntax = loadSyntax(className, syntaxConfiguration);
          try
          {
            DirectoryServer.registerAttributeSyntax(syntax, false);
            syntaxes.put(syntaxConfiguration.dn(), syntax);
          }
          catch (DirectoryException de)
          {
            int    msgID   = MSGID_CONFIG_SCHEMA_SYNTAX_CONFLICTING_SYNTAX;
            String message = getMessage(msgID,
                                  String.valueOf(syntaxConfiguration.dn()),
                                  de.getErrorMessage());
            logError(ErrorLogCategory.CONFIGURATION,
                     ErrorLogSeverity.SEVERE_ERROR, message, msgID);
            continue;
          }
        }
        catch (InitializationException ie)
        {
          logError(ErrorLogCategory.CONFIGURATION,
                   ErrorLogSeverity.SEVERE_ERROR,
                   ie.getMessage(), ie.getMessageID());
          continue;
        }
      }
    }
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationAddAcceptable(
                      AttributeSyntaxCfg configuration,
                      List<String> unacceptableReasons)
  {
    if (configuration.isEnabled())
    {
      // Get the name of the class and make sure we can instantiate it as an
      // attribute syntax.
      String className = configuration.getSyntaxClass();
      try
      {
        loadSyntax(className, null);
      }
      catch (InitializationException ie)
      {
        unacceptableReasons.add(ie.getMessage());
        return false;
      }
    }
    // If we've gotten here, then it's fine.
    return true;
  }
  /**
   * {@inheritDoc}
   */
  public ConfigChangeResult applyConfigurationAdd(
                                 AttributeSyntaxCfg configuration)
  {
    ResultCode        resultCode          = ResultCode.SUCCESS;
    boolean           adminActionRequired = false;
    ArrayList<String> messages            = new ArrayList<String>();
    configuration.addChangeListener(this);
    if (! configuration.isEnabled())
    {
      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }
    AttributeSyntax syntax = null;
    // Get the name of the class and make sure we can instantiate it as an
    // attribute syntax.
    String className = configuration.getSyntaxClass();
    try
    {
      syntax = loadSyntax(className, configuration);
      try
      {
        DirectoryServer.registerAttributeSyntax(syntax, false);
        syntaxes.put(configuration.dn(), syntax);
      }
      catch (DirectoryException de)
      {
        int    msgID   = MSGID_CONFIG_SCHEMA_SYNTAX_CONFLICTING_SYNTAX;
        String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                    de.getErrorMessage());
        messages.add(message);
        if (resultCode == ResultCode.SUCCESS)
        {
          resultCode = DirectoryServer.getServerErrorResultCode();
        }
      }
    }
    catch (InitializationException ie)
    {
      if (resultCode == ResultCode.SUCCESS)
      {
        resultCode = DirectoryServer.getServerErrorResultCode();
      }
      messages.add(ie.getMessage());
    }
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationDeleteAcceptable(
                      AttributeSyntaxCfg configuration,
                      List<String> unacceptableReasons)
  {
    // If the syntax is enabled, then check to see if there are any defined
    // attribute types that use the syntax.  If so, then don't allow it to be
    // deleted.
    boolean configAcceptable = true;
    AttributeSyntax syntax = syntaxes.get(configuration.dn());
    if (syntax != null)
    {
      String oid = syntax.getOID();
      for (AttributeType at : DirectoryServer.getAttributeTypes().values())
      {
        if (oid.equals(at.getSyntaxOID()))
        {
          int msgID = MSGID_CONFIG_SCHEMA_CANNOT_DELETE_SYNTAX_IN_USE;
          String message = getMessage(msgID, syntax.getSyntaxName(),
                                      at.getNameOrOID());
          unacceptableReasons.add(message);
          configAcceptable = false;
        }
      }
    }
    return configAcceptable;
  }
  /**
   * {@inheritDoc}
   */
  public ConfigChangeResult applyConfigurationDelete(
                                 AttributeSyntaxCfg configuration)
  {
    ResultCode        resultCode          = ResultCode.SUCCESS;
    boolean           adminActionRequired = false;
    ArrayList<String> messages            = new ArrayList<String>();
    AttributeSyntax syntax = syntaxes.remove(configuration.dn());
    if (syntax != null)
    {
      DirectoryServer.deregisterAttributeSyntax(syntax);
      syntax.finalizeSyntax();
    }
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      AttributeSyntaxCfg configuration,
                      List<String> unacceptableReasons)
  {
    if (configuration.isEnabled())
    {
      // Get the name of the class and make sure we can instantiate it as an
      // attribute syntax.
      String className = configuration.getSyntaxClass();
      try
      {
        loadSyntax(className, null);
      }
      catch (InitializationException ie)
      {
        unacceptableReasons.add(ie.getMessage());
        return false;
      }
    }
    else
    {
      // If the syntax is currently enabled and the change would make it
      // disabled, then only allow it if the syntax isn't already in use.
      AttributeSyntax syntax = syntaxes.get(configuration.dn());
      if (syntax != null)
      {
        String oid = syntax.getOID();
        for (AttributeType at : DirectoryServer.getAttributeTypes().values())
        {
          if (oid.equals(at.getSyntaxOID()))
          {
            int msgID = MSGID_CONFIG_SCHEMA_CANNOT_DISABLE_SYNTAX_IN_USE;
            String message = getMessage(msgID, syntax.getSyntaxName(),
                                        at.getNameOrOID());
            unacceptableReasons.add(message);
            return false;
          }
        }
      }
    }
    // If we've gotten here, then it's fine.
    return true;
  }
  /**
   * {@inheritDoc}
   */
  public ConfigChangeResult applyConfigurationChange(
                                 AttributeSyntaxCfg configuration)
  {
    ResultCode        resultCode          = ResultCode.SUCCESS;
    boolean           adminActionRequired = false;
    ArrayList<String> messages            = new ArrayList<String>();
    // Get the existing syntax if it's already enabled.
    AttributeSyntax existingSyntax = syntaxes.get(configuration.dn());
    // If the new configuration has the syntax disabled, then disable it if it
    // is enabled, or do nothing if it's already disabled.
    if (! configuration.isEnabled())
    {
      if (existingSyntax != null)
      {
        DirectoryServer.deregisterAttributeSyntax(existingSyntax);
        AttributeSyntax syntax = syntaxes.remove(configuration.dn());
        if (syntax != null)
        {
          syntax.finalizeSyntax();
        }
      }
      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }
    // Get the class for the attribute syntax.  If the syntax is already
    // enabled, then we shouldn't do anything with it although if the class has
    // changed then we'll at least need to indicate that administrative action
    // is required.  If the syntax is disabled, then instantiate the class and
    // initialize and register it as an attribute syntax.
    String className = configuration.getSyntaxClass();
    if (existingSyntax != null)
    {
      if (! className.equals(existingSyntax.getClass().getName()))
      {
        adminActionRequired = true;
      }
      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }
    AttributeSyntax syntax = null;
    try
    {
      syntax = loadSyntax(className, configuration);
      try
      {
        DirectoryServer.registerAttributeSyntax(syntax, false);
        syntaxes.put(configuration.dn(), syntax);
      }
      catch (DirectoryException de)
      {
        int    msgID   = MSGID_CONFIG_SCHEMA_SYNTAX_CONFLICTING_SYNTAX;
        String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                    de.getErrorMessage());
        messages.add(message);
        if (resultCode == ResultCode.SUCCESS)
        {
          resultCode = DirectoryServer.getServerErrorResultCode();
        }
      }
    }
    catch (InitializationException ie)
    {
      if (resultCode == ResultCode.SUCCESS)
      {
        resultCode = DirectoryServer.getServerErrorResultCode();
      }
      messages.add(ie.getMessage());
    }
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
  /**
   * Loads the specified class, instantiates it as an attribute syntax, and
   * optionally initializes that instance.
   *
   * @param  className      The fully-qualified name of the attribute syntax
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the attribute
   *                        syntax, or {@code null} if the attribute syntax
   *                        should not be initialized.
   *
   * @return  The possibly initialized attribute syntax.
   *
   * @throws  InitializationException  If a problem occurred while attempting to
   *                                   initialize the attribute syntax.
   */
  private AttributeSyntax loadSyntax(String className,
                                     AttributeSyntaxCfg configuration)
          throws InitializationException
  {
    try
    {
      AttributeSyntaxCfgDefn definition =
           AttributeSyntaxCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getSyntaxClassPropertyDefinition();
      Class<? extends AttributeSyntax> syntaxClass =
           propertyDefinition.loadClass(className, AttributeSyntax.class);
      AttributeSyntax syntax = syntaxClass.newInstance();
      if (configuration != null)
      {
        Method method =
             syntax.getClass().getMethod("initializeSyntax",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(syntax, configuration);
      }
      return syntax;
    }
    catch (Exception e)
    {
      int msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INITIALIZE;
      String message = getMessage(msgID, className,
                                  String.valueOf(configuration.dn()),
                                  stackTraceToSingleLineString(e));
      throw new InitializationException(msgID, message, e);
    }
  }
}
opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -52,6 +52,8 @@
import org.opends.server.admin.ClassLoaderProvider;
import org.opends.server.admin.server.ServerManagementContext;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.admin.std.server.DirectoryStringAttributeSyntaxCfg;
import org.opends.server.admin.std.server.PasswordValidatorCfg;
import org.opends.server.admin.std.server.SynchronizationProviderCfg;
import org.opends.server.admin.std.server.RootDSEBackendCfg;
@@ -184,22 +186,23 @@
       accountStatusNotificationHandlerConfigManager;
  // The default syntax to use for binary attributes.
  private AttributeSyntax defaultBinarySyntax;
  private AttributeSyntax<AttributeSyntaxCfg> defaultBinarySyntax;
  // The default syntax to use for Boolean attributes.
  private AttributeSyntax defaultBooleanSyntax;
  private AttributeSyntax<AttributeSyntaxCfg> defaultBooleanSyntax;
  // The default syntax to use for DN attributes.
  private AttributeSyntax defaultDNSyntax;
  private AttributeSyntax<AttributeSyntaxCfg> defaultDNSyntax;
  // The default syntax to use for integer attributes.
  private AttributeSyntax defaultIntegerSyntax;
  private AttributeSyntax<AttributeSyntaxCfg> defaultIntegerSyntax;
  // The default syntax to use for string attributes.
  private AttributeSyntax defaultStringSyntax;
  private AttributeSyntax<DirectoryStringAttributeSyntaxCfg>
               defaultStringSyntax;
  // The default attribute syntax to use for attributes with no defined syntax.
  private AttributeSyntax defaultSyntax;
  private AttributeSyntax<DirectoryStringAttributeSyntaxCfg> defaultSyntax;
  // The attribute type used to reference the "objectclass" attribute.
  private AttributeType objectClassAttributeType;
@@ -1857,7 +1860,7 @@
    try
    {
      AttributeSyntax syntax = new IA5StringSyntax();
      IA5StringSyntax syntax = new IA5StringSyntax();
      syntax.initializeSyntax(null);
      registerAttributeSyntax(syntax, true);
    }
@@ -1899,7 +1902,7 @@
    try
    {
      AttributeSyntax syntax = new GeneralizedTimeSyntax();
      GeneralizedTimeSyntax syntax = new GeneralizedTimeSyntax();
      syntax.initializeSyntax(null);
      registerAttributeSyntax(syntax, true);
    }
@@ -1920,7 +1923,7 @@
    try
    {
      AttributeSyntax syntax = new ObjectClassSyntax();
      ObjectClassSyntax syntax = new ObjectClassSyntax();
      syntax.initializeSyntax(null);
      registerAttributeSyntax(syntax, true);
    }
@@ -1941,7 +1944,7 @@
    try
    {
      AttributeSyntax syntax = new OIDSyntax();
      OIDSyntax syntax = new OIDSyntax();
      syntax.initializeSyntax(null);
      registerAttributeSyntax(syntax, true);
    }
@@ -1962,7 +1965,7 @@
    try
    {
      AttributeSyntax syntax = new TelephoneNumberSyntax();
      TelephoneNumberSyntax syntax = new TelephoneNumberSyntax();
      syntax.initializeSyntax(null);
      registerAttributeSyntax(syntax, true);
    }
@@ -3399,8 +3402,9 @@
        {
          try
          {
            oidSyntax = new OIDSyntax();
            oidSyntax.initializeSyntax(null);
            OIDSyntax newOIDSyntax = new OIDSyntax();
            newOIDSyntax.initializeSyntax(null);
            oidSyntax = newOIDSyntax;
            directoryServer.schema.registerSyntax(oidSyntax, true);
          }
          catch (Exception e)
opends/src/server/org/opends/server/core/SchemaConfigManager.java
@@ -34,7 +34,6 @@
import java.util.LinkedList;
import java.util.List;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.ConfigAddListener;
import org.opends.server.api.ConfigChangeListener;
import org.opends.server.api.ConfigDeleteListener;
@@ -418,231 +417,9 @@
  public void initializeAttributeSyntaxes()
         throws ConfigException, InitializationException
  {
    // First, get the attribute syntax configuration base entry.
    ConfigEntry syntaxBaseEntry;
    try
    {
      DN syntaxBaseDN = DN.decode(DN_SYNTAX_CONFIG_BASE);
      syntaxBaseEntry = configHandler.getConfigEntry(syntaxBaseDN);
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      int    msgID   = MSGID_CONFIG_SCHEMA_CANNOT_GET_SYNTAX_BASE;
      String message = getMessage(msgID, String.valueOf(e));
      throw new ConfigException(msgID, message, e);
    }
    if (syntaxBaseEntry == null)
    {
      // The syntax base entry does not exist.  This is not acceptable, so throw
      // an exception.
      int    msgID   = MSGID_CONFIG_SCHEMA_SYNTAX_BASE_DOES_NOT_EXIST;
      String message = getMessage(msgID);
      throw new ConfigException(msgID, message);
    }
    // Register add and delete listeners with the syntax base entry.  We don't
    // care about modifications to it.
    syntaxBaseEntry.registerAddListener(this);
    syntaxBaseEntry.registerDeleteListener(this);
    // See if the syntax base has any children.  If not, then this is very
    // bad, since we won't know how to deal with any attribute types.
    if (! syntaxBaseEntry.hasChildren())
    {
      int    msgID   = MSGID_CONFIG_SCHEMA_NO_SYNTAXES;
      String message = getMessage(msgID);
      throw new ConfigException(msgID, message);
    }
    // Iterate through the child entries and process them as syntax entries.
    for (ConfigEntry childEntry : syntaxBaseEntry.getChildren().values())
    {
      DN syntaxEntryDN = childEntry.getDN();
      // Register as a change listener for this syntax entry so that we will be
      // notified of any changes that may be made to it.
      childEntry.registerChangeListener(this);
      // Check to see if this entry appears to contain an attribute syntax
      // configuration.  If not, log a warning and skip it.
      if (! childEntry.hasObjectClass(OC_ATTRIBUTE_SYNTAX))
      {
        int    msgID   = MSGID_CONFIG_SCHEMA_ENTRY_DOES_NOT_HAVE_SYNTAX_CONFIG;
        String message = getMessage(msgID, String.valueOf(syntaxEntryDN));
        logError(ErrorLogCategory.CONFIGURATION,
                 ErrorLogSeverity.SEVERE_WARNING, message, msgID);
        continue;
      }
      // See if the entry contains an attribute that indicates whether the
      // syntax should be enabled.  If it does not, or if it is not set to
      // "true", then skip it.
      int msgID = MSGID_CONFIG_SCHEMA_SYNTAX_ATTR_DESCRIPTION_ENABLED;
      BooleanConfigAttribute enabledStub =
           new BooleanConfigAttribute(ATTR_SYNTAX_ENABLED, getMessage(msgID),
                                      false);
      try
      {
        BooleanConfigAttribute enabledAttr =
             (BooleanConfigAttribute)
             childEntry.getConfigAttribute(enabledStub);
        if (enabledAttr == null)
        {
          // The attribute is not present, so this syntax will be disabled.  Log
          // a message and continue.
          msgID = MSGID_CONFIG_SCHEMA_SYNTAX_NO_ENABLED_ATTR;
          String message = getMessage(msgID, String.valueOf(syntaxEntryDN));
          logError(ErrorLogCategory.CONFIGURATION,
                   ErrorLogSeverity.SEVERE_WARNING, message, msgID);
          continue;
        }
        else if (! enabledAttr.activeValue())
        {
          // The syntax is explicitly disabled.  Log a mild warning and
          // continue.
          msgID = MSGID_CONFIG_SCHEMA_SYNTAX_DISABLED;
          String message = getMessage(msgID, String.valueOf(syntaxEntryDN));
          logError(ErrorLogCategory.CONFIGURATION,
                   ErrorLogSeverity.INFORMATIONAL, message, msgID);
          continue;
        }
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SCHEMA_SYNTAX_UNABLE_TO_DETERMINE_ENABLED_STATE;
        String message = getMessage(msgID, String.valueOf(syntaxEntryDN),
                                    getExceptionMessage(e));
        logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
                 message, msgID);
        continue;
      }
      // See if the entry contains an attribute that specifies the class name
      // for the syntax implementation.  If it does, then load it and make sure
      // that it's a valid syntax implementation.  If there is no such
      // attribute, the specified class cannot be loaded, or it does not contain
      // a valid syntax implementation, then log an error and skip it.
      String className;
      msgID = MSGID_CONFIG_SCHEMA_SYNTAX_ATTR_DESCRIPTION_CLASS;
      StringConfigAttribute classStub =
           new StringConfigAttribute(ATTR_SYNTAX_CLASS, getMessage(msgID),
                                     true, false, true);
      try
      {
        StringConfigAttribute classAttr =
             (StringConfigAttribute)
             childEntry.getConfigAttribute(classStub);
        if (classAttr == null)
        {
          msgID = MSGID_CONFIG_SCHEMA_SYNTAX_NO_CLASS_ATTR;
          String message = getMessage(msgID, String.valueOf(syntaxEntryDN));
          logError(ErrorLogCategory.CONFIGURATION,
                   ErrorLogSeverity.SEVERE_ERROR, message, msgID);
          continue;
        }
        else
        {
          className = classAttr.activeValue();
        }
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_GET_CLASS;
        String message = getMessage(msgID, String.valueOf(syntaxEntryDN),
                                    getExceptionMessage(e));
        logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
                 message, msgID);
        continue;
      }
      AttributeSyntax syntax;
      try
      {
        Class syntaxClass = DirectoryServer.loadClass(className);
        syntax = (AttributeSyntax) syntaxClass.newInstance();
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INSTANTIATE;
        String message = getMessage(msgID, String.valueOf(className),
                                    String.valueOf(syntaxEntryDN),
                                    getExceptionMessage(e));
        logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
                 message, msgID);
        continue;
      }
      // Perform the necessary initialization for the syntax.
      try
      {
        syntax.initializeSyntax(childEntry);
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INITIALIZE;
        String message = getMessage(msgID, String.valueOf(className),
                                    String.valueOf(syntaxEntryDN),
                                    getExceptionMessage(e));
        logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
                 message, msgID);
        continue;
      }
      // Register the syntax with the server schema.
      try
      {
        schema.registerSyntax(syntax, false);
      }
      catch (DirectoryException de)
      {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, de);
        }
        msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CONFLICTING_SYNTAX;
        String message = getMessage(msgID, String.valueOf(syntaxEntryDN),
                                    de.getErrorMessage());
        logError(ErrorLogCategory.CONFIGURATION,
                 ErrorLogSeverity.SEVERE_WARNING, message, msgID);
        continue;
      }
    }
    AttributeSyntaxConfigManager syntaxConfigManager =
         new AttributeSyntaxConfigManager();
    syntaxConfigManager.initializeAttributeSyntaxes();
  }
opends/src/server/org/opends/server/messages/ConfigMessages.java
@@ -6734,6 +6734,28 @@
  /**
   * The message ID for the message that will be used if an attempt is made to
   * delete an attribute syntax that is in use by an attribute type.  This takes
   * two arguments, which is the name of the attribute syntax and the name or
   * OID of the attribute type that is using that syntax.
   */
  public static final int MSGID_CONFIG_SCHEMA_CANNOT_DELETE_SYNTAX_IN_USE =
       CATEGORY_MASK_CONFIG | SEVERITY_MASK_SEVERE_WARNING | 668;
  /**
   * The message ID for the message that will be used if an attempt is made to
   * disable an attribute syntax that is in use by an attribute type.  This
   * takes two arguments, which is the name of the attribute syntax and the name
   * or  OID of the attribute type that is using that syntax.
   */
  public static final int MSGID_CONFIG_SCHEMA_CANNOT_DISABLE_SYNTAX_IN_USE =
       CATEGORY_MASK_CONFIG | SEVERITY_MASK_SEVERE_WARNING | 669;
  /**
   * Associates a set of generic messages with the message IDs defined in this
@@ -8015,6 +8037,12 @@
                    "conflicts with another syntax defined in the server " +
                    "configuration:  %s.  This attribute syntax will not be " +
                    "used");
    registerMessage(MSGID_CONFIG_SCHEMA_CANNOT_DELETE_SYNTAX_IN_USE,
                    "Attribute syntax %s cannot be deleted from the server " +
                    "because it is in use by attribute type %s");
    registerMessage(MSGID_CONFIG_SCHEMA_CANNOT_DISABLE_SYNTAX_IN_USE,
                    "Attribute syntax %s cannot be disabled because it is in " +
                    "use by attribute type %s");
    registerMessage(MSGID_CONFIG_SCHEMA_NO_SCHEMA_DIR,
opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java
@@ -33,13 +33,13 @@
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.AttributeValueDecoder;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.AbsoluteSubtreeSpecification;
import org.opends.server.core.DirectoryServer;
@@ -54,9 +54,9 @@
 * syntax, which is used to select sets of entries in dynamic groups and
 * access control rules.
 */
public final class AbsoluteSubtreeSpecificationSyntax extends
    AttributeSyntax {
public final class AbsoluteSubtreeSpecificationSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
   */
@@ -97,17 +97,9 @@
  }
  /**
   * Initializes this attribute syntax based on the information in the
   * provided configuration entry.
   *
   * @param configEntry
   *          The configuration entry that contains the information to
   *          use to initialize this attribute syntax.
   * @throws ConfigException
   *           If an unrecoverable problem arises in the process of
   *           performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
      throws ConfigException {
    defaultEqualityMatchingRule = DirectoryServer
opends/src/server/org/opends/server/schema/AciSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -55,7 +55,7 @@
 * This class implements the access control information (aci) attribute syntax.
 */
public class AciSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -88,22 +88,14 @@
  public AciSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    // We don't need an approximate matching rule.
opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
@@ -33,12 +33,13 @@
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeType;
@@ -66,7 +67,7 @@
 * syntax is defined in RFC 2252.
 */
public class AttributeTypeSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -96,7 +97,6 @@
  public AttributeTypeSyntax()
  {
    super();
  }
@@ -104,7 +104,7 @@
  /**
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException, InitializationException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * matching will be allowed by default.
 */
public class AuthPasswordSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -73,22 +70,14 @@
  public AuthPasswordSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/BinarySyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * will be allowed by default.
 */
public class BinarySyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -77,22 +74,14 @@
  public BinarySyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/BitStringSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * capital letter "B" (e.g., '101001'B).
 */
public class BitStringSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -71,22 +68,14 @@
  public BitStringSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/BooleanSyntax.java
@@ -28,13 +28,13 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.AttributeValueDecoder;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1OctetString;
@@ -60,11 +60,8 @@
 * syntax.
 */
public class BooleanSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -97,22 +94,14 @@
  public BooleanSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/CertificateListSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -53,11 +53,8 @@
 * syntax.
 */
public class CertificateListSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -78,22 +75,14 @@
  public CertificateListSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/CertificatePairSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -53,11 +53,8 @@
 * syntax.
 */
public class CertificatePairSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -78,22 +75,14 @@
  public CertificatePairSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/CertificateSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * bytes.  It will be treated much like the octet string attribute syntax.
 */
public class CertificateSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -77,22 +74,14 @@
  public CertificateSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/CountryStringSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -56,11 +56,8 @@
 * ways, it will behave like the directory string attribute syntax.
 */
public class CountryStringSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default approximate matching rule for this syntax.
  private ApproximateMatchingRule defaultApproximateMatchingRule;
@@ -84,22 +81,14 @@
  public CountryStringSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultApproximateMatchingRule =
opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
@@ -33,12 +33,12 @@
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeType;
@@ -67,7 +67,7 @@
 * this syntax is defined in RFC 2252.
 */
public class DITContentRuleSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -97,7 +97,6 @@
  public DITContentRuleSyntax()
  {
    super();
  }
@@ -105,7 +104,7 @@
  /**
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException, InitializationException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
@@ -33,12 +33,12 @@
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -65,7 +65,7 @@
 * of this syntax is defined in RFC 2252.
 */
public class DITStructureRuleSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -95,7 +95,6 @@
  public DITStructureRuleSyntax()
  {
    super();
  }
@@ -103,7 +102,7 @@
  /**
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException, InitializationException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
@@ -31,12 +31,12 @@
import java.util.HashSet;
import java.util.StringTokenizer;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -71,11 +71,8 @@
 * </UL>
 */
public class DeliveryMethodSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The set of values that may be used as delivery methods.
   */
@@ -121,22 +118,14 @@
  public DeliveryMethodSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    allowedValues = new HashSet<String>(ALLOWED_VALUES.length);
opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
@@ -28,36 +28,29 @@
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.DirectoryStringAttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.AttributeValueDecoder;
import org.opends.server.api.ConfigurableComponent;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.BooleanConfigAttribute;
import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ByteString;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -72,25 +65,17 @@
 * matching will be allowed.
 */
public class DirectoryStringSyntax
       extends AttributeSyntax
       implements ConfigurableComponent
       extends AttributeSyntax<DirectoryStringAttributeSyntaxCfg>
       implements ConfigurationChangeListener<DirectoryStringAttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
   */
  private static final DebugTracer TRACER = getTracer();
  // The default approximate matching rule for this syntax.
  private ApproximateMatchingRule defaultApproximateMatchingRule;
  // Indicates whether we will allow zero-length values.
  private boolean allowZeroLengthValues;
  // The DN of the configuration entry for this syntax.
  private DN configEntryDN;
  // The reference to the configuration for this directory string syntax.
  private DirectoryStringAttributeSyntaxCfg currentConfig;
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -131,22 +116,14 @@
  public DirectoryStringSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(DirectoryStringAttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultApproximateMatchingRule =
@@ -190,44 +167,14 @@
    // it may be instantiated at times without a configuration entry.  If that
    // is the case, then we'll exit now before doing anything that could require
    // access to that entry.
    if (configEntry == null)
    if (configuration == null)
    {
      return;
    }
    allowZeroLengthValues = DEFAULT_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS;
    int msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_DESCRIPTION_ALLOW_ZEROLENGTH;
    BooleanConfigAttribute allowZeroLengthStub =
         new BooleanConfigAttribute(ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                                    getMessage(msgID), false);
    try
    {
      BooleanConfigAttribute allowZeroLengthAttr =
           (BooleanConfigAttribute)
           configEntry.getConfigAttribute(allowZeroLengthStub);
      if (allowZeroLengthAttr != null)
      {
        allowZeroLengthValues = allowZeroLengthAttr.activeValue();
      }
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_CANNOT_DETERMINE_ZEROLENGTH;
      String message = getMessage(msgID, ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                                  getExceptionMessage(e));
      logError(ErrorLogCategory.SCHEMA, ErrorLogSeverity.SEVERE_WARNING,
               message, msgID);
    }
    configEntryDN = configEntry.getDN();
    DirectoryServer.registerConfigurableComponent(this);
    currentConfig = configuration;
    currentConfig.addDirectoryStringChangeListener(this);
    allowZeroLengthValues = currentConfig.isAllowZeroLengthValues();
  }
@@ -237,7 +184,7 @@
   */
  public void finalizeSyntax()
  {
    DirectoryServer.deregisterConfigurableComponent(this);
    currentConfig.removeDirectoryStringChangeListener(this);
  }
@@ -385,161 +332,28 @@
  /**
   * Retrieves the DN of the configuration entry with which this component is
   * associated.
   *
   * @return  The DN of the configuration entry with which this component is
   *          associated.
   * {@inheritDoc}
   */
  public DN getConfigurableComponentEntryDN()
  public boolean isConfigurationChangeAcceptable(
                      DirectoryStringAttributeSyntaxCfg configuration,
                      List<String> unacceptableReasons)
  {
    return configEntryDN;
    // The configuration will always be acceptable.
    return true;
  }
  /**
   * Retrieves the set of configuration attributes that are associated with this
   * configurable component.
   *
   * @return  The set of configuration attributes that are associated with this
   *          configurable component.
   * {@inheritDoc}
   */
  public List<ConfigAttribute> getConfigurationAttributes()
  public ConfigChangeResult applyConfigurationChange(
              DirectoryStringAttributeSyntaxCfg configuration)
  {
    LinkedList<ConfigAttribute> configAttrs = new LinkedList<ConfigAttribute>();
    currentConfig = configuration;
    allowZeroLengthValues = configuration.isAllowZeroLengthValues();
    int msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_DESCRIPTION_ALLOW_ZEROLENGTH;
    configAttrs.add(new BooleanConfigAttribute(
                             ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                             getMessage(msgID), false, allowZeroLengthValues));
    return configAttrs;
  }
  /**
   * Indicates whether the provided configuration entry has an acceptable
   * configuration for this component.  If it does not, then detailed
   * information about the problem(s) should be added to the provided list.
   *
   * @param  configEntry          The configuration entry for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that can be used to hold messages about
   *                              why the provided entry does not have an
   *                              acceptable configuration.
   *
   * @return  <CODE>true</CODE> if the provided entry has an acceptable
   *          configuration for this component, or <CODE>false</CODE> if not.
   */
  public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
                                            List<String> unacceptableReasons)
  {
    boolean configValid = true;
    int msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_DESCRIPTION_ALLOW_ZEROLENGTH;
    BooleanConfigAttribute allowZeroLengthStub =
         new BooleanConfigAttribute(ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                                    getMessage(msgID), false);
    try
    {
      BooleanConfigAttribute allowZeroLengthAttr =
           (BooleanConfigAttribute)
           configEntry.getConfigAttribute(allowZeroLengthStub);
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      configValid = false;
      msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_CANNOT_DETERMINE_ZEROLENGTH;
      unacceptableReasons.add(getMessage(msgID,
                                         ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                                         getExceptionMessage(e)));
    }
    return configValid;
  }
  /**
   * Makes a best-effort attempt to apply the configuration contained in the
   * provided entry.  Information about the result of this processing should be
   * added to the provided message list.  Information should always be added to
   * this list if a configuration change could not be applied.  If detailed
   * results are requested, then information about the changes applied
   * successfully (and optionally about parameters that were not changed) should
   * also be included.
   *
   * @param  configEntry      The entry containing the new configuration to
   *                          apply for this component.
   * @param  detailedResults  Indicates whether detailed information about the
   *                          processing should be added to the list.
   *
   * @return  Information about the result of the configuration update.
   */
  public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
                                                  boolean detailedResults)
  {
    ResultCode        resultCode          = ResultCode.SUCCESS;
    boolean           adminActionRequired = false;
    ArrayList<String> messages            = new ArrayList<String>();
    boolean newAllowZeroLengthValues = false;
    int msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_DESCRIPTION_ALLOW_ZEROLENGTH;
    BooleanConfigAttribute allowZeroLengthStub =
         new BooleanConfigAttribute(ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                                    getMessage(msgID), false);
    try
    {
      BooleanConfigAttribute allowZeroLengthAttr =
           (BooleanConfigAttribute)
           configEntry.getConfigAttribute(allowZeroLengthStub);
      if (allowZeroLengthAttr != null)
      {
        newAllowZeroLengthValues = allowZeroLengthAttr.pendingValue();
      }
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      resultCode = DirectoryServer.getServerErrorResultCode();
      msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_CANNOT_DETERMINE_ZEROLENGTH;
      messages.add(getMessage(msgID, ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                              getExceptionMessage(e)));
    }
    if (resultCode == ResultCode.SUCCESS)
    {
      if (newAllowZeroLengthValues != allowZeroLengthValues)
      {
        allowZeroLengthValues = newAllowZeroLengthValues;
        if (detailedResults)
        {
          msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_UPDATED_ALLOW_ZEROLENGTH;
          messages.add(getMessage(msgID, ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
                                  String.valueOf(configEntry.getDN()),
                                  String.valueOf(allowZeroLengthValues)));
        }
      }
    }
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    return new ConfigChangeResult(ResultCode.SUCCESS, false);
  }
}
opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
@@ -28,13 +28,13 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.AttributeValueDecoder;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeValue;
@@ -60,7 +60,7 @@
 * matching will be allowed by default.
 */
public class DistinguishedNameSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -103,22 +103,14 @@
  public DistinguishedNameSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * objectclass.
 */
public class EnhancedGuideSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -79,23 +76,14 @@
  public EnhancedGuideSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/FaxNumberSyntax.java
@@ -30,12 +30,12 @@
import java.util.HashSet;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -66,11 +66,8 @@
 * </UL>
 */
public class FaxNumberSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The set of allowed fax parameter values, formatted entirely in lowercase
   * characters.
@@ -111,22 +108,14 @@
  public FaxNumberSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/FaxSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * will be treated much like the octet string attribute syntax.
 */
public class FaxSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -77,22 +74,14 @@
  public FaxSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
@@ -35,12 +35,12 @@
import java.util.TimeZone;
import java.util.concurrent.locks.ReentrantLock;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1OctetString;
@@ -70,7 +70,7 @@
 * offset like "-0500" for representing values that are not in UTC.
 */
public class GeneralizedTimeSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -128,22 +128,14 @@
  public GeneralizedTimeSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/GuideSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * to a specified objectclass.
 */
public class GuideSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -79,22 +76,14 @@
  public GuideSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/IA5StringSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * matching will be allowed.
 */
public class IA5StringSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default approximate matching rule for this syntax.
  private ApproximateMatchingRule defaultApproximateMatchingRule;
@@ -82,22 +79,14 @@
  public IA5StringSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultApproximateMatchingRule =
opends/src/server/org/opends/server/schema/IntegerSyntax.java
@@ -28,13 +28,13 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.AttributeValueDecoder;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeValue;
@@ -57,11 +57,8 @@
 * will be allowed by default.
 */
public class IntegerSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -110,22 +107,14 @@
  public IntegerSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/JPEGSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * will be treated much like the octet string attribute syntax.
 */
public class JPEGSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -77,22 +74,14 @@
  public JPEGSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -59,7 +59,7 @@
 * syntax is defined in RFC 2252.
 */
public class LDAPSyntaxDescriptionSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -89,22 +89,14 @@
  public LDAPSyntaxDescriptionSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
@@ -31,12 +31,12 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -62,7 +62,7 @@
 * syntax is defined in RFC 2252.
 */
public class MatchingRuleSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -71,7 +71,6 @@
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -92,22 +91,14 @@
  public MatchingRuleSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
@@ -33,13 +33,13 @@
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.MatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeType;
@@ -66,7 +66,7 @@
 * this syntax is defined in RFC 2252.
 */
public class MatchingRuleUseSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -96,7 +96,6 @@
  public MatchingRuleUseSyntax()
  {
    super();
  }
@@ -104,7 +103,7 @@
  /**
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException, InitializationException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -58,7 +58,7 @@
 * string value.
 */
public class NameAndOptionalUIDSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -67,7 +67,6 @@
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -85,22 +84,14 @@
  public NameAndOptionalUIDSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/NameFormSyntax.java
@@ -33,12 +33,12 @@
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeType;
@@ -67,7 +67,7 @@
 * is defined in RFC 2252.
 */
public class NameFormSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -76,7 +76,6 @@
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -97,7 +96,6 @@
  public NameFormSyntax()
  {
    super();
  }
@@ -105,7 +103,7 @@
  /**
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException, InitializationException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/NumericStringSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * matching will be allowed by default.
 */
public class NumericStringSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -79,22 +76,14 @@
  public NumericStringSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/OIDSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * a numeric OID.  Equality and substring matching will be allowed by default.
 */
public class OIDSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -74,22 +71,14 @@
  public OIDSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
@@ -35,12 +35,12 @@
import java.util.Map;
import java.util.Set;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeType;
@@ -69,7 +69,7 @@
 * syntax is defined in RFC 2252.
 */
public class ObjectClassSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
@@ -78,7 +78,6 @@
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -99,7 +98,6 @@
  public ObjectClassSyntax()
  {
    super();
  }
@@ -107,7 +105,7 @@
  /**
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException, InitializationException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/OctetStringSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * Equality, ordering, and substring matching will be allowed by default.
 */
public class OctetStringSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -77,22 +74,14 @@
  public OctetStringSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * be allowed by default.
 */
public class OtherMailboxSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -76,22 +73,14 @@
  public OtherMailboxSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/PostalAddressSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * matching will be allowed.
 */
public class PostalAddressSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -76,22 +73,14 @@
  public PostalAddressSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * this implementation behaves exactly like the directory string syntax.
 */
public class PresentationAddressSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default approximate matching rule for this syntax.
  private ApproximateMatchingRule defaultApproximateMatchingRule;
@@ -80,22 +77,14 @@
  public PresentationAddressSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultApproximateMatchingRule =
opends/src/server/org/opends/server/schema/PrintableStringSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -55,11 +55,8 @@
 * ordering, substring, and approximate matching will be allowed.
 */
public class PrintableStringSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default approximate matching rule for this syntax.
  private ApproximateMatchingRule defaultApproximateMatchingRule;
@@ -83,22 +80,14 @@
  public PrintableStringSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultApproximateMatchingRule =
opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * directory string syntax.
 */
public class ProtocolInformationSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default approximate matching rule for this syntax.
  private ApproximateMatchingRule defaultApproximateMatchingRule;
@@ -80,22 +77,14 @@
  public ProtocolInformationSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultApproximateMatchingRule =
opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java
@@ -33,13 +33,13 @@
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.AttributeValueDecoder;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.RFC3672SubtreeSpecification;
@@ -55,15 +55,16 @@
 * is used to specify the scope of sub-entries (RFC 3672). Equality will
 * be allowed eventually, although it's not implemented yet.
 */
public final class RFC3672SubtreeSpecificationSyntax extends
    AttributeSyntax {
public final class RFC3672SubtreeSpecificationSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
   */
  private static final DebugTracer TRACER = getTracer();
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -126,17 +127,9 @@
  }
  /**
   * Initializes this attribute syntax based on the information in the
   * provided configuration entry.
   *
   * @param configEntry
   *          The configuration entry that contains the information to
   *          use to initialize this attribute syntax.
   * @throws ConfigException
   *           If an unrecoverable problem arises in the process of
   *           performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
      throws ConfigException {
    defaultEqualityMatchingRule = DirectoryServer
opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java
@@ -33,13 +33,13 @@
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.AttributeValueDecoder;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.RelativeSubtreeSpecification;
@@ -55,15 +55,16 @@
 * syntax, which is used to specify the scope of access controls and
 * their parameters.
 */
public final class RelativeSubtreeSpecificationSyntax extends
    AttributeSyntax {
public final class RelativeSubtreeSpecificationSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
   */
  private static final DebugTracer TRACER = getTracer();
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -73,6 +74,8 @@
  // The default substring matching rule for this syntax.
  private SubstringMatchingRule defaultSubstringMatchingRule;
  /**
   * Create a new attribute value decoder with the specified root DN.
   *
@@ -127,18 +130,10 @@
  }
  /**
   * Initializes this attribute syntax based on the information in the
   * provided configuration entry.
   *
   * @param configEntry
   *          The configuration entry that contains the information to
   *          use to initialize this attribute syntax.
   * @throws ConfigException
   *           If an unrecoverable problem arises in the process of
   *           performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
      throws ConfigException {
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException {
    defaultEqualityMatchingRule = DirectoryServer
        .getEqualityMatchingRule(EMR_OCTET_STRING_OID);
opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -54,11 +54,8 @@
 * except that approximate matching will not be allowed.
 */
public class SubstringAssertionSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -79,22 +76,14 @@
  public SubstringAssertionSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -53,11 +53,8 @@
 * syntax.
 */
public class SupportedAlgorithmSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -78,22 +75,14 @@
  public SupportedAlgorithmSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
@@ -28,32 +28,24 @@
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.TelephoneNumberAttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.ConfigurableComponent;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.BooleanConfigAttribute;
import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DN;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -71,29 +63,21 @@
 * only accept values in the E.123 international telephone number format.
 */
public class TelephoneNumberSyntax
       extends AttributeSyntax
       implements ConfigurableComponent
       extends AttributeSyntax<TelephoneNumberAttributeSyntaxCfg>
       implements ConfigurationChangeListener<TelephoneNumberAttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
   */
  private static final DebugTracer TRACER = getTracer();
  // Indicates whether this matching rule should operate in strict mode.
  private boolean strictMode;
  // The DN of the configuration entry, if we have one.
  private DN configEntryDN;
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
  // The default substring matching rule for this syntax.
  private SubstringMatchingRule defaultSubstringMatchingRule;
  // The current configuration for this telephone number syntax.
  private TelephoneNumberAttributeSyntaxCfg currentConfig;
  /**
@@ -105,22 +89,14 @@
  public TelephoneNumberSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(TelephoneNumberAttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
@@ -146,39 +122,11 @@
    // we should use the strict compliance mode.  If not, just assume that we
    // won't.
    strictMode = false;
    if (configEntry != null)
    if (configuration != null)
    {
      configEntryDN = configEntry.getDN();
      DirectoryServer.registerConfigurableComponent(this);
      int msgID = MSGID_ATTR_SYNTAX_TELEPHONE_DESCRIPTION_STRICT_MODE;
      BooleanConfigAttribute strictStub =
           new BooleanConfigAttribute(ATTR_TELEPHONE_STRICT_MODE,
                                      getMessage(msgID), false);
      try
      {
        BooleanConfigAttribute strictAttr =
             (BooleanConfigAttribute)
             configEntry.getConfigAttribute(strictStub);
        if (strictAttr != null)
        {
          strictMode = strictAttr.activeValue();
        }
      }
      catch (Exception e)
      {
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_ATTR_SYNTAX_TELEPHONE_CANNOT_DETERMINE_STRICT_MODE;
        String message = getMessage(msgID, String.valueOf(configEntryDN),
                                    getExceptionMessage(e));
        logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
                 message, msgID);
      }
      currentConfig = configuration;
      currentConfig.addTelephoneNumberChangeListener(this);
      strictMode = currentConfig.isStrictFormat();
    }
  }
@@ -189,7 +137,7 @@
   */
  public void finalizeSyntax()
  {
    DirectoryServer.deregisterConfigurableComponent(this);
    currentConfig.removeTelephoneNumberChangeListener(this);
  }
@@ -410,173 +358,28 @@
  /**
   * Retrieves the DN of the configuration entry with which this component is
   * associated.
   *
   * @return  The DN of the configuration entry with which this component is
   *          associated.
   * {@inheritDoc}
   */
  public DN getConfigurableComponentEntryDN()
  public boolean isConfigurationChangeAcceptable(
                      TelephoneNumberAttributeSyntaxCfg configuration,
                      List<String> unacceptableReasons)
  {
    return configEntryDN;
    // The configuration will always be acceptable.
    return true;
  }
  /**
   * Retrieves the set of configuration attributes that are associated with this
   * configurable component.
   *
   * @return  The set of configuration attributes that are associated with this
   *          configurable component.
   * {@inheritDoc}
   */
  public List<ConfigAttribute> getConfigurationAttributes()
  public ConfigChangeResult applyConfigurationChange(
              TelephoneNumberAttributeSyntaxCfg configuration)
  {
    LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
    currentConfig = configuration;
    strictMode = configuration.isStrictFormat();
    int msgID = MSGID_ATTR_SYNTAX_TELEPHONE_DESCRIPTION_STRICT_MODE;
    attrList.add(new BooleanConfigAttribute(ATTR_TELEPHONE_STRICT_MODE,
                                            getMessage(msgID), false,
                                            strictMode));
    return attrList;
  }
  /**
   * Indicates whether the provided configuration entry has an acceptable
   * configuration for this component.  If it does not, then detailed
   * information about the problem(s) should be added to the provided list.
   *
   * @param  configEntry          The configuration entry for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that can be used to hold messages about
   *                              why the provided entry does not have an
   *                              acceptable configuration.
   *
   * @return  <CODE>true</CODE> if the provided entry has an acceptable
   *          configuration for this component, or <CODE>false</CODE> if not.
   */
  public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
                                            List<String> unacceptableReasons)
  {
    boolean configIsAcceptable = true;
    // See if the entry has a "strict mode" attribute.
    int msgID = MSGID_ATTR_SYNTAX_TELEPHONE_DESCRIPTION_STRICT_MODE;
    BooleanConfigAttribute strictStub =
         new BooleanConfigAttribute(ATTR_TELEPHONE_STRICT_MODE,
                                    getMessage(msgID), false);
    try
    {
      // In this case, we don't care what the value is, or even whether the
      // attribute exists at all.  However, if it does exist, then it must have
      // a valid Boolean value.
      BooleanConfigAttribute strictAttr =
           (BooleanConfigAttribute)
           configEntry.getConfigAttribute(strictStub);
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      msgID = MSGID_ATTR_SYNTAX_TELEPHONE_CANNOT_DETERMINE_STRICT_MODE;
      String message = getMessage(msgID, String.valueOf(configEntryDN),
                                  getExceptionMessage(e));
      unacceptableReasons.add(message);
      configIsAcceptable = false;
    }
    return configIsAcceptable;
  }
  /**
   * Makes a best-effort attempt to apply the configuration contained in the
   * provided entry.  Information about the result of this processing should be
   * added to the provided message list.  Information should always be added to
   * this list if a configuration change could not be applied.  If detailed
   * results are requested, then information about the changes applied
   * successfully (and optionally about parameters that were not changed) should
   * also be included.
   *
   * @param  configEntry      The entry containing the new configuration to
   *                          apply for this component.
   * @param  detailedResults  Indicates whether detailed information about the
   *                          processing should be added to the list.
   *
   * @return  Information about the result of the configuration update.
   */
  public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
                                                  boolean detailedResults)
  {
    ResultCode        resultCode          = ResultCode.SUCCESS;
    boolean           adminActionRequired = false;
    ArrayList<String> messages            = new ArrayList<String>();
    // See if the entry has a "strict mode" attribute.
    boolean newStrictMode;
    int msgID = MSGID_ATTR_SYNTAX_TELEPHONE_DESCRIPTION_STRICT_MODE;
    BooleanConfigAttribute strictStub =
         new BooleanConfigAttribute(ATTR_TELEPHONE_STRICT_MODE,
                                    getMessage(msgID), false);
    try
    {
      BooleanConfigAttribute strictAttr =
           (BooleanConfigAttribute)
           configEntry.getConfigAttribute(strictStub);
      if (strictAttr == null)
      {
        // This is fine -- the entry doesn't contain this attribute so we'll
        // just use the default.
        newStrictMode = false;
      }
      else
      {
        // The entry does contain this attribute, so we'll use its value.
        newStrictMode = strictAttr.pendingValue();
      }
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      msgID = MSGID_ATTR_SYNTAX_TELEPHONE_CANNOT_DETERMINE_STRICT_MODE;
      messages.add(getMessage(msgID, String.valueOf(configEntryDN),
                              getExceptionMessage(e)));
      resultCode = DirectoryServer.getServerErrorResultCode();
      newStrictMode = false;
    }
    if (resultCode == ResultCode.SUCCESS)
    {
      if (strictMode != newStrictMode)
      {
        strictMode = newStrictMode;
        if (detailedResults)
        {
          msgID = MSGID_ATTR_SYNTAX_TELEPHONE_UPDATED_STRICT_MODE;
          messages.add(getMessage(msgID, String.valueOf(strictMode)));
        }
      }
    }
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    return new ConfigChangeResult(ResultCode.SUCCESS, false);
  }
}
opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
@@ -30,12 +30,12 @@
import java.util.HashSet;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -66,11 +66,8 @@
 * </UL>
 */
public class TeletexTerminalIdentifierSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The set of allowed fax parameter values, formatted entirely in lowercase
   * characters.
@@ -109,22 +106,14 @@
  public TeletexTerminalIdentifierSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/TelexNumberSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -53,11 +53,8 @@
 * and substring matching will be allowed by default.
 */
public class TelexNumberSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -78,22 +75,14 @@
  public TelexNumberSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
@@ -33,12 +33,12 @@
import java.util.TimeZone;
import java.util.concurrent.locks.ReentrantLock;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1OctetString;
@@ -69,13 +69,15 @@
 * allowed.
 */
public class UTCTimeSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  /**
   * The tracer object for the debug logger.
   */
  private static final DebugTracer TRACER = getTracer();
  /**
   * The lock that will be used to provide threadsafe access to the date
   * formatter.
@@ -132,16 +134,9 @@
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/UUIDSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -52,11 +52,8 @@
 * Equality and ordering matching will be allowed by default.
 */
public class UUIDSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -74,22 +71,14 @@
  public UUIDSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/src/server/org/opends/server/schema/UserPasswordSyntax.java
@@ -28,12 +28,12 @@
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.api.ApproximateMatchingRule;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
@@ -64,11 +64,8 @@
 * </UL>
 */
public class UserPasswordSyntax
       extends AttributeSyntax
       extends AttributeSyntax<AttributeSyntaxCfg>
{
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -83,22 +80,14 @@
  public UserPasswordSyntax()
  {
    super();
  }
  /**
   * Initializes this attribute syntax based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this attribute syntax.
   *
   * @throws  ConfigException  If an unrecoverable problem arises in the
   *                           process of performing the initialization.
   * {@inheritDoc}
   */
  public void initializeSyntax(ConfigEntry configEntry)
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    defaultEqualityMatchingRule =
opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java
@@ -76,10 +76,8 @@
  @Test(dataProvider= "acceptableValues")
  public void testAcceptableValues(String value, Boolean result) throws Exception
  {
    AttributeSyntax syntax = new BitStringSyntax();
    ConfigEntry configEntry = DirectoryServer.getConfigEntry(
                        DN.decode("cn=Bit String,cn=Syntaxes,cn=config"));
    syntax.initializeSyntax(configEntry);
    BitStringSyntax syntax = new BitStringSyntax();
    syntax.initializeSyntax(null);
    ByteString byteStringValue = new ASN1OctetString(value);
opends/tests/unit-tests-testng/src/server/org/opends/server/schema/ConfigurableAttributeSyntaxTest.java
@@ -32,8 +32,10 @@
import java.util.ArrayList;
import org.opends.server.TestCaseUtils;
import org.opends.server.admin.server.AdminTestCaseUtils;
import org.opends.server.admin.std.meta.TelephoneNumberAttributeSyntaxCfgDefn;
import org.opends.server.admin.std.server.TelephoneNumberAttributeSyntaxCfg;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.ConfigurableComponent;
import org.opends.server.config.ConfigEntry;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1OctetString;
@@ -45,12 +47,12 @@
public class ConfigurableAttributeSyntaxTest extends SchemaTestCase
{
  /**
   * Build the data for the test of the hasAcceptableValue Methods
   * Build the data for the test of the hasAcceptableValue Methods
   * of the class extending the AttributeSyntax class and having
   * some configuration capabilities.
   */
  @DataProvider(name="acceptableValues")
  public Object[][] createapproximateMatchingRuleTest() throws Exception
  public Object[][] createSyntaxTest() throws Exception
  {
    // some config object used later in the test
    ConfigEntry strictConfig = new ConfigEntry(TestCaseUtils.makeEntry(
@@ -77,7 +79,7 @@
    // fill this table with tables containing :
    // - the configEntry that must be applied before the test.
    // - the name of the Syntax rule to test.
    // - the name of the Syntax to test.
    // - a value that must be tested for correctness.
    // - a boolean indicating if the value is correct.
    return new Object[][] {
@@ -89,8 +91,8 @@
         {strictConfig, SYNTAX_TELEPHONE_OID, "+1x512x315x0280", false},
         {strictConfig, SYNTAX_TELEPHONE_OID, "   ", false},
         {strictConfig, SYNTAX_TELEPHONE_OID, "", false},
         {relaxedConfig, SYNTAX_TELEPHONE_OID, "+1+512 315 0280", true},
         {relaxedConfig, SYNTAX_TELEPHONE_OID, "+1x512x315x0280", true},
         {strictConfig, SYNTAX_TELEPHONE_OID, "   ", false},
@@ -106,30 +108,35 @@
  public void testAcceptableValues(ConfigEntry config, String oid, String value,
      Boolean result) throws Exception
  {
    AttributeSyntax rule = DirectoryServer.getAttributeSyntax(oid, false);
    ConfigurableComponent component = (ConfigurableComponent) rule;
    TelephoneNumberAttributeSyntaxCfg configuration =
         AdminTestCaseUtils.getConfiguration(
              TelephoneNumberAttributeSyntaxCfgDefn.getInstance(),
              config.getEntry());
    TelephoneNumberSyntax syntax =
         (TelephoneNumberSyntax) DirectoryServer.getAttributeSyntax(oid, false);
    // apply the configuration.
    ArrayList<String> unacceptableReasons = new ArrayList<String>();
    assertTrue(
        component.hasAcceptableConfiguration(config, unacceptableReasons));
    assertTrue(syntax.isConfigurationChangeAcceptable(configuration,
                                                      unacceptableReasons));
    ConfigChangeResult configResult =
      component.applyNewConfiguration(config, false);
         syntax.applyConfigurationChange(configuration);
    assertEquals(configResult.getResultCode(), ResultCode.SUCCESS);
    // check the syntax of the given value.
    Boolean liveResult = rule.valueIsAcceptable(
    // check the syntax of the given value.
    Boolean liveResult = syntax.valueIsAcceptable(
        new ASN1OctetString(value), new StringBuilder());
    assertEquals(result, liveResult);
    // call the getters to increase code coverage...
    rule.getApproximateMatchingRule();
    rule.getDescription();
    rule.getEqualityMatchingRule();
    rule.getOID();
    rule.getOrderingMatchingRule();
    rule.getSubstringMatchingRule();
    rule.getSyntaxName();
    rule.toString();
    syntax.getApproximateMatchingRule();
    syntax.getDescription();
    syntax.getEqualityMatchingRule();
    syntax.getOID();
    syntax.getOrderingMatchingRule();
    syntax.getSubstringMatchingRule();
    syntax.getSyntaxName();
    syntax.toString();
  }
}