From a435d43b65859fa6384fd1edb2dd6e7f38f095fe Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Mon, 17 Mar 2014 14:38:12 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1308 Migrate schema support

---
 opendj3-server-dev/src/server/org/opends/server/api/AttributeSyntax.java                                                            |    3 
 opendj3-server-dev/src/server/org/opends/server/schema/FaxSyntax.java                                                               |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/GuideSyntax.java                                                             |    5 
 opendj3-server-dev/src/server/org/opends/server/types/DirectoryConfig.java                                                          |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/PresentationAddressSyntax.java                                               |    7 
 opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java                                |    8 
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java                                       |   15 +-
 opendj3-server-dev/src/server/org/opends/server/schema/NameFormSyntax.java                                                          |    5 
 opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyTestCase.java |    1 
 opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java                                                            |    8 
 opendj3-server-dev/src/server/org/opends/server/schema/CertificateSyntax.java                                                       |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordSyntax.java                                                      |    5 
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewAttributePanel.java                                          |   12 
 opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactAssertionSyntax.java                                         |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/NumericStringSyntax.java                                                     |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameSyntax.java                                                 |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/UUIDSyntax.java                                                              |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/PostalAddressSyntax.java                                                     |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java                                         |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/AciSyntax.java                                                               |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/OctetStringSyntax.java                                                       |    5 
 opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java                                                   |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/DITStructureRuleSyntax.java                                                  |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/UTCTimeSyntax.java                                                           |    5 
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java                                                |   49 +++++++
 opendj3-server-dev/src/server/org/opends/server/schema/OtherMailboxSyntax.java                                                      |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/PrintableStringSyntax.java                                                   |    7 
 opendj3-server-dev/src/server/org/opends/server/schema/ProtocolInformationSyntax.java                                               |    7 
 opendj3-server-dev/src/server/org/opends/server/schema/CertificateListSyntax.java                                                   |    5 
 opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java                                                   |    2 
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/AttributeIndex.java                                                    |    2 
 opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java                                                   |    5 
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/ApproximateIndexer.java                                                |    4 
 opendj3-server-dev/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java                                              |    5 
 opendj3-server-dev/src/server/org/opends/server/core/MatchingRuleConfigManager.java                                                 |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/IA5StringSyntax.java                                                         |    7 
 opendj3-server-dev/src/server/org/opends/server/schema/DITContentRuleSyntax.java                                                    |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java                                                |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/EnhancedGuideSyntax.java                                                     |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/OIDSyntax.java                                                               |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/UserPasswordSyntax.java                                                      |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/BitStringSyntax.java                                                         |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/DirectoryStringSyntax.java                                                   |    7 
 opendj3-server-dev/src/server/org/opends/server/schema/BooleanSyntax.java                                                           |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/JPEGSyntax.java                                                              |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleSyntax.java                                                      |    3 
 opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java                                                   |    3 
 opendj3-server-dev/src/server/org/opends/server/schema/TelexNumberSyntax.java                                                       |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java                                             |   12 
 opendj3-server-dev/src/server/org/opends/server/schema/TelephoneNumberSyntax.java                                                   |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/ObjectClassSyntax.java                                                       |    5 
 opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java                                                           |   11 
 opendj3-server-dev/src/server/org/opends/server/schema/AttributeTypeSyntax.java                                                     |   11 
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/MatchingRulePanel.java                                          |    9 
 opendj3-server-dev/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java                                                |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/BinarySyntax.java                                                            |    2 
 opendj3-server-dev/src/server/org/opends/server/schema/CountryStringSyntax.java                                                     |    7 
 opendj3-server-dev/src/server/org/opends/server/schema/SubstringAssertionSyntax.java                                                |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/IntegerSyntax.java                                                           |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/CertificatePairSyntax.java                                                   |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/FaxNumberSyntax.java                                                         |    5 
 opendj3-server-dev/src/server/org/opends/server/schema/DeliveryMethodSyntax.java                                                    |    7 
 62 files changed, 193 insertions(+), 201 deletions(-)

diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
index 4eb3f82..1555a50 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
@@ -85,9 +85,8 @@
 import org.opends.guitools.controlpanel.util.Utilities;
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.opends.server.types.AttributeType;
@@ -765,19 +764,19 @@
       for (String key : orderedKeys)
       {
         MatchingRule matchingRule = matchingRuleNameMap.get(key);
-        if (matchingRule instanceof ApproximateMatchingRule)
+        if (Utilities.isApproximateMatchingRule(matchingRule))
         {
           approximateElements.add(matchingRule);
         }
-        else if (matchingRule instanceof MatchingRule)
+        else if (Utilities.isEqualityMatchingRule(matchingRule))
         {
           equalityElements.add(matchingRule);
         }
-        else if (matchingRule instanceof OrderingMatchingRule)
+        else if (Utilities.isOrderingMatchingRule(matchingRule))
         {
           orderingElements.add(matchingRule);
         }
-        else if (matchingRule instanceof SubstringMatchingRule)
+        else if (Utilities.isSubstringMatchingRule(matchingRule))
         {
           substringElements.add(matchingRule);
         }
@@ -1180,7 +1179,7 @@
     }
   }
 
-  private ApproximateMatchingRule getApproximateMatchingRule()
+  private MatchingRule getApproximateMatchingRule()
   {
     if (approximate.getSelectedIndex() == 0)
     {
@@ -1188,7 +1187,7 @@
     }
     else
     {
-      return (ApproximateMatchingRule)approximate.getSelectedItem();
+      return (MatchingRule)approximate.getSelectedItem();
     }
   }
 
diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/MatchingRulePanel.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/MatchingRulePanel.java
index a1e845a..df532af 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/MatchingRulePanel.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/MatchingRulePanel.java
@@ -273,20 +273,19 @@
   static LocalizableMessage getTypeValue(MatchingRule matchingRule)
   {
     LocalizableMessage text;
-    String matchingRuleName = matchingRule.getClass().getSimpleName().toLowerCase();
-    if (matchingRuleName.contains("equality"))
+    if (Utilities.isEqualityMatchingRule(matchingRule))
     {
       text = INFO_CTRL_PANEL_INDEX_EQUALITY.get();
     }
-    else if (matchingRuleName.contains("ordering"))
+    else if (Utilities.isOrderingMatchingRule(matchingRule))
     {
       text = INFO_CTRL_PANEL_INDEX_ORDERING.get();
     }
-    else if (matchingRuleName.contains("substring"))
+    else if (Utilities.isSubstringMatchingRule(matchingRule))
     {
       text = INFO_CTRL_PANEL_INDEX_SUBSTRING.get();
     }
-    else if (matchingRuleName.contains("approximate"))
+    else if (Utilities.isApproximateMatchingRule(matchingRule))
     {
       text = INFO_CTRL_PANEL_INDEX_APPROXIMATE.get();
     }
diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewAttributePanel.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewAttributePanel.java
index 8f57a62..6b21f9a 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewAttributePanel.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewAttributePanel.java
@@ -257,19 +257,19 @@
       for (String key : orderedKeys)
       {
         MatchingRule matchingRule = matchingRuleNameMap.get(key);
-        if (matchingRule instanceof ApproximateMatchingRule)
+        if (Utilities.isApproximateMatchingRule(matchingRule))
         {
           approximateElements.add(matchingRule);
         }
-        else if (matchingRule instanceof MatchingRule)
+        else if (Utilities.isEqualityMatchingRule(matchingRule))
         {
           equalityElements.add(matchingRule);
         }
-        else if (matchingRule instanceof OrderingMatchingRule)
+        else if (Utilities.isOrderingMatchingRule(matchingRule))
         {
           orderingElements.add(matchingRule);
         }
-        else if (matchingRule instanceof SubstringMatchingRule)
+        else if (Utilities.isSubstringMatchingRule(matchingRule))
         {
           substringElements.add(matchingRule);
         }
@@ -777,7 +777,7 @@
     }
   }
 
-  private ApproximateMatchingRule getApproximateMatchingRule()
+  private MatchingRule getApproximateMatchingRule()
   {
     if (approximate.getSelectedIndex() == 0)
     {
@@ -785,7 +785,7 @@
     }
     else
     {
-      return (ApproximateMatchingRule)approximate.getSelectedItem();
+      return (MatchingRule)approximate.getSelectedItem();
     }
   }
 
diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
index 4068095..b9bc820 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
@@ -115,9 +115,13 @@
 import org.opends.quicksetup.Installation;
 import org.opends.quicksetup.ui.UIFactory;
 import org.opends.quicksetup.util.Utils;
+import org.opends.server.api.ApproximateMatchingRule;
 import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.ConfigHandler;
+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.core.DirectoryServer;
 import org.opends.server.core.LockFileManager;
@@ -2854,4 +2858,49 @@
       }
     }
   }
+
+  /**
+   * Indicates if the provided matching rule is an equality matching rule.
+   *
+   * @param matchingRule
+   *            The matching rule.
+   * @return {@code true} if this matching rule is an equality mathing rule.
+   */
+  public static boolean isEqualityMatchingRule(MatchingRule matchingRule) {
+    return matchingRule instanceof EqualityMatchingRule;
+  }
+
+  /**
+   * Indicates if the provided matching rule is an approximate matching rule.
+   *
+   * @param matchingRule
+   *            The matching rule.
+   * @return {@code true} if this matching rule is an approximate mathing rule.
+   */
+  public static boolean isApproximateMatchingRule(MatchingRule matchingRule) {
+    return matchingRule instanceof ApproximateMatchingRule;
+  }
+
+  /**
+   * Indicates if the provided matching rule is a substring matching rule.
+   *
+   * @param matchingRule
+   *            The matching rule.
+   * @return {@code true} if this matching rule is a substring mathing rule.
+   */
+  public static boolean isSubstringMatchingRule(MatchingRule matchingRule) {
+    return matchingRule instanceof SubstringMatchingRule;
+  }
+
+  /**
+   * Indicates if the provided matching rule is an ordering matching rule.
+   *
+   * @param matchingRule
+   *            The matching rule.
+   * @return {@code true} if this matching rule is an ordering mathing rule.
+   */
+  public static boolean isOrderingMatchingRule(MatchingRule matchingRule) {
+    return matchingRule instanceof OrderingMatchingRule;
+  }
+
 }
diff --git a/opendj3-server-dev/src/server/org/opends/server/api/AttributeSyntax.java b/opendj3-server-dev/src/server/org/opends/server/api/AttributeSyntax.java
index ceb4672..fc4b069 100644
--- a/opendj3-server-dev/src/server/org/opends/server/api/AttributeSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/api/AttributeSyntax.java
@@ -191,8 +191,7 @@
    *          approximate matches will not be allowed for this type by
    *          default.
    */
-  public abstract ApproximateMatchingRule
-                       getApproximateMatchingRule();
+  public abstract MatchingRule getApproximateMatchingRule();
 
 
 
diff --git a/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java b/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java
index 4eb518e..e56a154 100644
--- a/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java
+++ b/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java
@@ -540,7 +540,7 @@
                               VirtualAttributeRule rule,
                               AttributeValue value)
   {
-    ApproximateMatchingRule matchingRule = rule.getAttributeType().getApproximateMatchingRule();
+    MatchingRule matchingRule = rule.getAttributeType().getApproximateMatchingRule();
     if (matchingRule == null)
     {
       return ConditionResult.UNDEFINED;
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ApproximateIndexer.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ApproximateIndexer.java
index 331ca37..615deeb 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ApproximateIndexer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ApproximateIndexer.java
@@ -33,8 +33,8 @@
 import org.forgerock.opendj.ldap.DecodeException;
 import org.forgerock.opendj.ldap.schema.Schema;
 import org.forgerock.opendj.ldap.spi.IndexingOptions;
-import org.opends.server.api.ApproximateMatchingRule;
 import org.opends.server.api.ExtensibleIndexer;
+import org.opends.server.api.MatchingRule;
 import org.opends.server.types.AttributeType;
 
 /**
@@ -46,7 +46,7 @@
   /**
    * The attribute type approximate matching rule.
    */
-  private ApproximateMatchingRule approximateRule;
+  private MatchingRule approximateRule;
 
   /**
    * Create a new attribute approximate indexer for the given index
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/AttributeIndex.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/AttributeIndex.java
index 53c3b07..b8cd0a8 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/AttributeIndex.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/AttributeIndex.java
@@ -1394,7 +1394,7 @@
 
     try
     {
-      ApproximateMatchingRule approximateMatchingRule =
+      MatchingRule approximateMatchingRule =
           approximateFilter.getAttributeType().getApproximateMatchingRule();
       // Make a key from the normalized assertion value.
       // FIXME JNR this looks wrong, it should use normalizeAssertionValue()
diff --git a/opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java b/opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java
index 7e74a72..b0135fc 100644
--- a/opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java
+++ b/opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java
@@ -41,7 +41,6 @@
 import org.forgerock.opendj.ldap.ConditionResult;
 import org.forgerock.opendj.ldap.DecodeException;
 import org.forgerock.util.Reject;
-import org.opends.server.api.ApproximateMatchingRule;
 import org.opends.server.api.MatchingRule;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
@@ -118,7 +117,7 @@
 
 
   // The approximate matching rule for this matched values filter.
-  private ApproximateMatchingRule approximateMatchingRule;
+  private MatchingRule approximateMatchingRule;
 
   // The normalized subFinal value for this matched values filter.
   private ByteString normalizedSubFinal;
@@ -1166,7 +1165,7 @@
    * @return  The approximate matching rule that should be used for this matched
    *          values filter, or <CODE>null</CODE> if there is none.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     if (approximateMatchingRule == null)
     {
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java b/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
index 668fc32..cf95f11 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
@@ -91,7 +91,7 @@
 import org.opends.server.api.AccountStatusNotificationHandler;
 import org.opends.server.api.AlertGenerator;
 import org.opends.server.api.AlertHandler;
-import org.opends.server.api.ApproximateMatchingRule;
+import org.opends.server.api.MatchingRule;
 import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.AuthenticationPolicy;
 import org.opends.server.api.Backend;
@@ -117,7 +117,6 @@
 import org.opends.server.api.InitializationCompletedListener;
 import org.opends.server.api.InvokableComponent;
 import org.opends.server.api.KeyManagerProvider;
-import org.opends.server.api.MatchingRule;
 import org.opends.server.api.MatchingRuleFactory;
 import org.opends.server.api.MonitorProvider;
 import org.opends.server.api.OrderingMatchingRule;
@@ -3121,10 +3120,10 @@
    * @return  The requested approximate matching rule, or <CODE>null</CODE> if
    *          no such matching rule has been defined in the server.
    */
-  public static ApproximateMatchingRule
+  public static MatchingRule
                      getApproximateMatchingRule(String lowerName)
   {
-    return (ApproximateMatchingRule) directoryServer.schema.getMatchingRule(lowerName);
+    return (MatchingRule) directoryServer.schema.getMatchingRule(lowerName);
   }
 
 
@@ -3143,7 +3142,7 @@
    *                              <CODE>overwriteExisting</CODE> flag is set to
    *                              <CODE>false</CODE>
    */
-  public static void registerApproximateMatchingRule(ApproximateMatchingRule
+  public static void registerApproximateMatchingRule(MatchingRule
                                                           matchingRule,
                                                      boolean overwriteExisting)
          throws DirectoryException
@@ -3159,7 +3158,7 @@
    *
    * @param  matchingRule  The matching rule to deregister with the server.
    */
-  public static void deregisterApproximateMatchingRule(ApproximateMatchingRule
+  public static void deregisterApproximateMatchingRule(MatchingRule
                                                             matchingRule)
   {
     directoryServer.schema.deregisterMatchingRule(matchingRule);
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/MatchingRuleConfigManager.java b/opendj3-server-dev/src/server/org/opends/server/core/MatchingRuleConfigManager.java
index b356a15..7821df6 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/MatchingRuleConfigManager.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/MatchingRuleConfigManager.java
@@ -42,7 +42,6 @@
 import org.opends.server.admin.std.server.RootCfg;
 import org.opends.server.admin.server.ServerManagementContext;
 import org.opends.server.admin.std.meta.MatchingRuleCfgDefn;
-import org.opends.server.api.ApproximateMatchingRule;
 import org.opends.server.api.MatchingRule;
 import org.opends.server.api.MatchingRuleFactory;
 import org.opends.server.api.OrderingMatchingRule;
@@ -263,7 +262,7 @@
         String oid = matchingRule.getOID();
         for (AttributeType at : DirectoryServer.getAttributeTypes().values())
         {
-          ApproximateMatchingRule amr = at.getApproximateMatchingRule();
+          MatchingRule amr = at.getApproximateMatchingRule();
           if ((amr != null) && oid.equals(amr.getOID()))
           {
             LocalizableMessage message =
@@ -401,7 +400,7 @@
           String oid = matchingRule.getOID();
           for (AttributeType at : DirectoryServer.getAttributeTypes().values())
           {
-            ApproximateMatchingRule amr = at.getApproximateMatchingRule();
+            MatchingRule amr = at.getApproximateMatchingRule();
             if ((amr != null) && oid.equals(amr.getOID()))
             {
               LocalizableMessage message =
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/AciSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/AciSyntax.java
index 4f4c1db..38aa45a 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/AciSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/AciSyntax.java
@@ -29,9 +29,8 @@
 
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -191,7 +190,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // we don't have an approximateMatchingRule
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/AttributeTypeSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/AttributeTypeSyntax.java
index d75a7f2..0a1b195 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/AttributeTypeSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/AttributeTypeSyntax.java
@@ -39,9 +39,8 @@
 import org.forgerock.opendj.ldap.schema.AttributeUsage;
 import org.opends.server.admin.std.server.*;
 import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -221,7 +220,7 @@
    * {@inheritDoc}
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
@@ -441,7 +440,7 @@
     String description = null;
     AttributeType superiorType = null;
     AttributeSyntax<?> syntax = DirectoryServer.getDefaultAttributeSyntax();
-    ApproximateMatchingRule approximateMatchingRule = null;
+    MatchingRule approximateMatchingRule = null;
     MatchingRule equalityMatchingRule = null;
     OrderingMatchingRule orderingMatchingRule = null;
     SubstringMatchingRule substringMatchingRule = null;
@@ -914,8 +913,8 @@
     {
       String ruleName  = approxRules.get(0);
       String lowerName = toLowerCase(ruleName);
-      ApproximateMatchingRule amr =
-           (ApproximateMatchingRule) schema.getMatchingRule(lowerName);
+      MatchingRule amr =
+           (MatchingRule) schema.getMatchingRule(lowerName);
       if (amr == null)
       {
         // This is bad because we have no idea what the approximate matching
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordSyntax.java
index 12cc801..f05e56e 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordSyntax.java
@@ -31,9 +31,8 @@
 
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -194,7 +193,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/BinarySyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/BinarySyntax.java
index bb6b9f1..344c81f 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/BinarySyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/BinarySyntax.java
@@ -198,7 +198,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/BitStringSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/BitStringSyntax.java
index c35e4d9..c9051b9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/BitStringSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/BitStringSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -181,7 +180,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matches are not allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/BooleanSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/BooleanSyntax.java
index 9f16c7e..88936e9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/BooleanSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/BooleanSyntax.java
@@ -32,9 +32,8 @@
 import org.forgerock.opendj.ldap.ByteSequence;
 import org.forgerock.opendj.ldap.ByteString;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.opends.server.core.DirectoryServer;
@@ -191,7 +190,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matches are not allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactAssertionSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactAssertionSyntax.java
index 4d2998b..c2fbdaa 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactAssertionSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactAssertionSyntax.java
@@ -31,9 +31,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -176,7 +175,7 @@
   /**
    * {@inheritDoc}
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matching will not be allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateListSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateListSyntax.java
index 9200692..de8fb8b 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateListSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateListSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -200,7 +199,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/CertificatePairSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/CertificatePairSyntax.java
index 46c190f..243cf23 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/CertificatePairSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/CertificatePairSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -200,7 +199,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateSyntax.java
index 27f556b..ff25719 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateSyntax.java
@@ -35,9 +35,8 @@
 
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.std.server.CertificateAttributeSyntaxCfg;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -245,7 +244,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/CountryStringSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/CountryStringSyntax.java
index 244131e..c54f807 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/CountryStringSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/CountryStringSyntax.java
@@ -33,9 +33,8 @@
 
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.std.server.CountryStringAttributeSyntaxCfg;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -66,7 +65,7 @@
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   // The default approximate matching rule for this syntax.
-  private ApproximateMatchingRule defaultApproximateMatchingRule;
+  private MatchingRule defaultApproximateMatchingRule;
 
   // The default equality matching rule for this syntax.
   private MatchingRule defaultEqualityMatchingRule;
@@ -256,7 +255,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return defaultApproximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/DITContentRuleSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/DITContentRuleSyntax.java
index 08b99d0..00708f1 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/DITContentRuleSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/DITContentRuleSyntax.java
@@ -37,9 +37,8 @@
 import org.forgerock.opendj.ldap.ByteSequence;
 import org.forgerock.opendj.ldap.schema.ObjectClassType;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -195,7 +194,7 @@
    * {@inheritDoc}
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/DITStructureRuleSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
index 946618c..680f067 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
@@ -35,9 +35,8 @@
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -190,7 +189,7 @@
   /**
    * {@inheritDoc}
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/DeliveryMethodSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
index c1bb576..c9e12cd 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
@@ -33,9 +33,8 @@
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -98,7 +97,7 @@
   private HashSet<String> allowedValues;
 
   // The default approximate matching rule for this syntax.
-  private ApproximateMatchingRule defaultApproximateMatchingRule;
+  private MatchingRule defaultApproximateMatchingRule;
 
   // The default equality matching rule for this syntax.
   private MatchingRule defaultEqualityMatchingRule;
@@ -260,7 +259,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return defaultApproximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/DirectoryStringSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/DirectoryStringSyntax.java
index 5844b07..7f2ebab 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/DirectoryStringSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/DirectoryStringSyntax.java
@@ -35,9 +35,8 @@
 import org.forgerock.opendj.ldap.ResultCode;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.opends.server.core.DirectoryServer;
@@ -61,7 +60,7 @@
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   // The default approximate matching rule for this syntax.
-  private ApproximateMatchingRule defaultApproximateMatchingRule;
+  private MatchingRule defaultApproximateMatchingRule;
 
   // Indicates whether we will allow zero-length values.
   private boolean allowZeroLengthValues;
@@ -255,7 +254,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return defaultApproximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
index 74c3d0d..d64dd9c 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
@@ -33,9 +33,8 @@
 import org.forgerock.opendj.config.server.ConfigException;
 import org.forgerock.opendj.ldap.ByteSequence;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.opends.server.core.DirectoryServer;
@@ -200,7 +199,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/EnhancedGuideSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
index 5aba98f..35900c7 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -203,7 +202,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/FaxNumberSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/FaxNumberSyntax.java
index feeb3bc..a6f9cd7 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/FaxNumberSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/FaxNumberSyntax.java
@@ -32,9 +32,8 @@
 import org.forgerock.i18n.slf4j.LocalizedLogger;
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -233,7 +232,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/FaxSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/FaxSyntax.java
index be3e2db..3fceeff 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/FaxSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/FaxSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -199,7 +198,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
index 63dc2fe..3d81e51 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
@@ -37,9 +37,8 @@
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.LocalizableMessageBuilder;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -227,7 +226,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matching will not be allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/GuideSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/GuideSyntax.java
index 26d541c..10dd5ba 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/GuideSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/GuideSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -200,7 +199,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/IA5StringSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/IA5StringSyntax.java
index 0c3d437..bb799ab 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/IA5StringSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/IA5StringSyntax.java
@@ -29,9 +29,8 @@
 import org.forgerock.i18n.slf4j.LocalizedLogger;
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -55,7 +54,7 @@
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   // The default approximate matching rule for this syntax.
-  private ApproximateMatchingRule defaultApproximateMatchingRule;
+  private MatchingRule defaultApproximateMatchingRule;
 
   // The default equality matching rule for this syntax.
   private MatchingRule defaultEqualityMatchingRule;
@@ -211,7 +210,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return defaultApproximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/IntegerSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/IntegerSyntax.java
index 337c052..1040421 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/IntegerSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/IntegerSyntax.java
@@ -31,9 +31,8 @@
 import org.forgerock.opendj.config.server.ConfigException;
 import org.forgerock.opendj.ldap.ByteSequence;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.opends.server.core.DirectoryServer;
@@ -203,7 +202,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/JPEGSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/JPEGSyntax.java
index 77efab2..c551395 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/JPEGSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/JPEGSyntax.java
@@ -34,9 +34,8 @@
 
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.std.server.JPEGAttributeSyntaxCfg;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -215,7 +214,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
index 85e8c75..f7021c4 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
@@ -218,7 +218,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
@@ -1072,7 +1072,7 @@
      *          matches will not be allowed for this type by default.
      */
     @Override
-    public ApproximateMatchingRule getApproximateMatchingRule()
+    public MatchingRule getApproximateMatchingRule()
     {
       return subSyntax.getApproximateMatchingRule();
     }
@@ -1110,7 +1110,7 @@
     private OrderingMatchingRule orderingMatchingRule;
 
     //The approximate matching rule.
-    private ApproximateMatchingRule approximateMatchingRule;
+    private MatchingRule approximateMatchingRule;
 
 
     //Creates a new instance of this syntax.
@@ -1265,7 +1265,7 @@
      *          matches will not be allowed for this type by default.
      */
     @Override
-    public ApproximateMatchingRule getApproximateMatchingRule()
+    public MatchingRule getApproximateMatchingRule()
     {
       if(approximateMatchingRule == null)
       {
@@ -1306,7 +1306,7 @@
     private OrderingMatchingRule orderingMatchingRule;
 
     //The approximate matching rule.
-    private ApproximateMatchingRule approximateMatchingRule;
+    private MatchingRule approximateMatchingRule;
 
     //The definition of this syntax.
     private String definition;
@@ -1481,7 +1481,7 @@
      *          matches will not be allowed for this type by default.
      */
     @Override
-    public ApproximateMatchingRule getApproximateMatchingRule()
+    public MatchingRule getApproximateMatchingRule()
     {
       if(approximateMatchingRule == null)
       {
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleSyntax.java
index f2f6253..01e656e 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleSyntax.java
@@ -34,7 +34,6 @@
 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.MatchingRule;
 import org.opends.server.api.OrderingMatchingRule;
@@ -218,7 +217,7 @@
    *          matches will not be allowed for this type by default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
index 6c62fb7..1224826 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
@@ -35,7 +35,6 @@
 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.MatchingRule;
 import org.opends.server.api.OrderingMatchingRule;
@@ -190,7 +189,7 @@
   /**
    * {@inheritDoc}
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
index f608f2d..07abfa9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
@@ -29,9 +29,8 @@
 
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -196,7 +195,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/NameFormSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/NameFormSyntax.java
index ead0863..772821d 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/NameFormSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/NameFormSyntax.java
@@ -37,9 +37,8 @@
 import org.forgerock.opendj.ldap.ByteSequence;
 import org.forgerock.opendj.ldap.schema.ObjectClassType;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -194,7 +193,7 @@
    * {@inheritDoc}
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/NumericStringSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/NumericStringSyntax.java
index 914c8c5..bcc0093 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/NumericStringSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/NumericStringSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -203,7 +202,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/OIDSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/OIDSyntax.java
index 3fb483e..ffb86db 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/OIDSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/OIDSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -190,7 +189,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/ObjectClassSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/ObjectClassSyntax.java
index 41f8819..2b160a6 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/ObjectClassSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/ObjectClassSyntax.java
@@ -39,9 +39,8 @@
 import org.forgerock.opendj.ldap.ByteSequence;
 import org.forgerock.opendj.ldap.schema.ObjectClassType;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -198,7 +197,7 @@
    * {@inheritDoc}
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/OctetStringSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/OctetStringSyntax.java
index a0e0536..45f87cd 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/OctetStringSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/OctetStringSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -199,7 +198,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/OtherMailboxSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/OtherMailboxSyntax.java
index 6072645..0d8a646 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/OtherMailboxSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/OtherMailboxSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -193,7 +192,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matching is not allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/PostalAddressSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/PostalAddressSyntax.java
index b46c8d2..5200478 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/PostalAddressSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/PostalAddressSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -194,7 +193,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matching will not be allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/PresentationAddressSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/PresentationAddressSyntax.java
index 5587d8a..4340984 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/PresentationAddressSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/PresentationAddressSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -57,7 +56,7 @@
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   // The default approximate matching rule for this syntax.
-  private ApproximateMatchingRule defaultApproximateMatchingRule;
+  private MatchingRule defaultApproximateMatchingRule;
 
   // The default equality matching rule for this syntax.
   private MatchingRule defaultEqualityMatchingRule;
@@ -213,7 +212,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return defaultApproximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/PrintableStringSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/PrintableStringSyntax.java
index a250f67..5ccb023 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/PrintableStringSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/PrintableStringSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -59,7 +58,7 @@
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   // The default approximate matching rule for this syntax.
-  private ApproximateMatchingRule defaultApproximateMatchingRule;
+  private MatchingRule defaultApproximateMatchingRule;
 
   // The default equality matching rule for this syntax.
   private MatchingRule defaultEqualityMatchingRule;
@@ -215,7 +214,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return defaultApproximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/ProtocolInformationSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
index 2e0e694..2959b29 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -57,7 +56,7 @@
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   // The default approximate matching rule for this syntax.
-  private ApproximateMatchingRule defaultApproximateMatchingRule;
+  private MatchingRule defaultApproximateMatchingRule;
 
   // The default equality matching rule for this syntax.
   private MatchingRule defaultEqualityMatchingRule;
@@ -213,7 +212,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return defaultApproximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/SubstringAssertionSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
index 5656c91..7ade8c6 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -203,7 +202,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matching will not be allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
index 15d0225..73ab070 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
@@ -34,9 +34,8 @@
 import org.forgerock.opendj.config.server.ConfigException;
 import org.forgerock.opendj.ldap.ByteSequence;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.opends.server.core.DirectoryServer;
@@ -190,7 +189,7 @@
    *         default.
    */
   @Override
-  public ApproximateMatchingRule getApproximateMatchingRule() {
+  public MatchingRule getApproximateMatchingRule() {
 
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
index 8f02e77..1547028 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -203,7 +202,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/TelephoneNumberSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
index 3112693..8b5207f 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
@@ -34,9 +34,8 @@
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -232,7 +231,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
index f5871e3..8ec87f8 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
@@ -32,9 +32,8 @@
 import org.forgerock.i18n.slf4j.LocalizedLogger;
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -234,7 +233,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/TelexNumberSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/TelexNumberSyntax.java
index aea3c92..0b38960 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/TelexNumberSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/TelexNumberSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -199,7 +198,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/UTCTimeSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/UTCTimeSyntax.java
index 039c6f3..6e9dc00 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/UTCTimeSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/UTCTimeSyntax.java
@@ -36,9 +36,8 @@
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.LocalizableMessageBuilder;
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -257,7 +256,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // Approximate matching will not be allowed by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/UUIDSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/UUIDSyntax.java
index c07f1d2..5e8a719 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/UUIDSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/UUIDSyntax.java
@@ -30,9 +30,8 @@
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -189,7 +188,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/UserPasswordSyntax.java b/opendj3-server-dev/src/server/org/opends/server/schema/UserPasswordSyntax.java
index aab0803..2ced188 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/UserPasswordSyntax.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/UserPasswordSyntax.java
@@ -31,9 +31,8 @@
 
 
 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.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.forgerock.opendj.config.server.ConfigException;
@@ -195,7 +194,7 @@
    *          attributes with this syntax, or <CODE>null</CODE> if approximate
    *          matches will not be allowed for this type by default.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     // There is no approximate matching rule by default.
     return null;
diff --git a/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java b/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
index f14be6a..bf9ea2c 100644
--- a/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
+++ b/opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
@@ -32,7 +32,6 @@
 
 import org.forgerock.i18n.slf4j.LocalizedLogger;
 import org.forgerock.opendj.ldap.schema.AttributeUsage;
-import org.opends.server.api.ApproximateMatchingRule;
 import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
 import org.opends.server.api.OrderingMatchingRule;
@@ -69,7 +68,7 @@
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   // The approximate matching rule for this attribute type.
-  private final ApproximateMatchingRule approximateMatchingRule;
+  private final MatchingRule approximateMatchingRule;
 
   // The syntax for this attribute type.
   private final AttributeSyntax<?> syntax;
@@ -251,8 +250,7 @@
                        String oid, String description,
                        AttributeType superiorType,
                        AttributeSyntax<?> syntax,
-                       ApproximateMatchingRule
-                            approximateMatchingRule,
+                       MatchingRule approximateMatchingRule,
                        MatchingRule equalityMatchingRule,
                        OrderingMatchingRule orderingMatchingRule,
                        SubstringMatchingRule substringMatchingRule,
@@ -449,7 +447,7 @@
    * @return  The matching rule that should be used for approximate
    *          matching with this attribute type.
    */
-  public ApproximateMatchingRule getApproximateMatchingRule()
+  public MatchingRule getApproximateMatchingRule()
   {
     return approximateMatchingRule;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/types/DirectoryConfig.java b/opendj3-server-dev/src/server/org/opends/server/types/DirectoryConfig.java
index f8bebac..06d09f2 100644
--- a/opendj3-server-dev/src/server/org/opends/server/types/DirectoryConfig.java
+++ b/opendj3-server-dev/src/server/org/opends/server/types/DirectoryConfig.java
@@ -33,11 +33,10 @@
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.opendj.ldap.ResultCode;
 import org.opends.server.api.AlertGenerator;
-import org.opends.server.api.ApproximateMatchingRule;
+import org.opends.server.api.MatchingRule;
 import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.ChangeNotificationListener;
 import org.opends.server.api.ConfigHandler;
-import org.opends.server.api.MatchingRule;
 import org.opends.server.api.ExtendedOperationHandler;
 import org.opends.server.api.InvokableComponent;
 import org.opends.server.api.OrderingMatchingRule;
@@ -224,7 +223,7 @@
    *          <CODE>null</CODE> if no such matching rule has been
    *          defined in the server.
    */
-  public static ApproximateMatchingRule
+  public static MatchingRule
        getApproximateMatchingRule(String lowerName)
   {
     return DirectoryServer.getApproximateMatchingRule(lowerName);
diff --git a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyTestCase.java b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyTestCase.java
index bbb73fc..234c7a8 100644
--- a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyTestCase.java
+++ b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyTestCase.java
@@ -53,7 +53,6 @@
 import org.opends.server.extensions.LDAPPassThroughAuthenticationPolicyFactory.ConnectionPool;
 import org.opends.server.extensions.LDAPPassThroughAuthenticationPolicyFactory.LDAPConnectionFactory;
 import org.opends.server.protocols.ldap.*;
-import org.opends.server.schema.DirectoryStringSyntax;
 import org.opends.server.schema.GeneralizedTimeSyntax;
 import org.opends.server.schema.UserPasswordSyntax;
 import org.opends.server.tools.LDAPReader;
diff --git a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java
index 8621436..c5787af 100644
--- a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java
+++ b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestAttributeType.java
@@ -33,9 +33,8 @@
 
 import org.forgerock.opendj.ldap.schema.AttributeUsage;
 import org.forgerock.util.Utils;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.MatchingRule;
+import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.api.SubstringMatchingRule;
 import org.opends.server.core.DirectoryServer;
@@ -61,7 +60,7 @@
     private AttributeSyntax syntax;
 
     // The approximate matching rule for this attribute type.
-    private ApproximateMatchingRule approximateMatchingRule;
+    private MatchingRule approximateMatchingRule;
 
     // The equality matching rule for this attribute type.
     private MatchingRule equalityMatchingRule;
@@ -287,8 +286,7 @@
      * @param approximateMatchingRule
      *          The approximateMatchingRule.
      */
-    public void setApproximateMatchingRule(
-        ApproximateMatchingRule approximateMatchingRule) {
+    public void setApproximateMatchingRule(MatchingRule approximateMatchingRule) {
       this.approximateMatchingRule = approximateMatchingRule;
     }
 

--
Gitblit v1.10.0