From 2bf80e51262791cae4bea6553c4af052e96dc740 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 25 Jun 2007 00:06:03 +0000
Subject: [PATCH] Migrate the matching rule configuration to the admin framework.

---
 opends/src/server/org/opends/server/api/MatchingRule.java |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/api/MatchingRule.java b/opends/src/server/org/opends/server/api/MatchingRule.java
index 53c9f22..7a7618a 100644
--- a/opends/src/server/org/opends/server/api/MatchingRule.java
+++ b/opends/src/server/org/opends/server/api/MatchingRule.java
@@ -28,7 +28,7 @@
 
 
 
-import org.opends.server.config.ConfigEntry;
+import org.opends.server.admin.std.server.MatchingRuleCfg;
 import org.opends.server.config.ConfigException;
 import org.opends.server.types.ByteString;
 import org.opends.server.types.ConditionResult;
@@ -41,16 +41,18 @@
  * This class defines the set of methods and structures that must be
  * implemented by a Directory Server module that implements a matching
  * rule.
+ *
+ * @param  <T>  The type of configuration handled by this matching
+ *              rule.
  */
-public abstract class MatchingRule
+public abstract class MatchingRule<T extends MatchingRuleCfg>
 {
   /**
    * Initializes this matching rule based on the information in the
    * provided configuration entry.
    *
-   * @param  configEntry  The configuration entry that contains the
-   *                      information to use to initialize this
-   *                      matching rule.
+   * @param  configuration  The configuration to use to intialize this
+   *                        matching rule.
    *
    * @throws  ConfigException  If an unrecoverable problem arises in
    *                           the process of performing the
@@ -60,12 +62,23 @@
    *                                   configuration-related occurs
    *                                   during initialization.
    */
-  public abstract void initializeMatchingRule(ConfigEntry configEntry)
+  public abstract void initializeMatchingRule(T configuration)
          throws ConfigException, InitializationException;
 
 
 
   /**
+   * Performs any finalization that may be needed whenever this
+   * matching rule is taken out of service.
+   */
+  public void finalizeMatchingRule()
+  {
+    // No implementation is required by default.
+  }
+
+
+
+  /**
    * Retrieves the common name for this matching rule.
    *
    * @return  The common name for this matching rule, or

--
Gitblit v1.10.0