From 400e6da1ab8ba44d21afa97fd1dea668a190dae9 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sat, 23 Jun 2007 21:31:35 +0000
Subject: [PATCH] Provide a way to control the order in which plugins are invoked.  This implementation is similar to that used by DSEE 6.  The "cn=Plugins,cn=config" configuration entry now supports a number of new configuration attributes (one per plugin type) that can be used to control the invocation order for plugins of that type.  The plugin order specification should be a string that is a comma-delimited list of the names of the plugins in the order in which they should be invoked, and it should also include an asterisk to indicate the order in which any unmatched plugins should be invoked.

---
 opendj-sdk/opends/src/server/org/opends/server/messages/ConfigMessages.java |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/messages/ConfigMessages.java b/opendj-sdk/opends/src/server/org/opends/server/messages/ConfigMessages.java
index 12c0a0f..138b8b8 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/messages/ConfigMessages.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/messages/ConfigMessages.java
@@ -6694,6 +6694,46 @@
 
 
 
+  /**
+   * The message ID for the message that will be used if a plugin order
+   * definition contains an empty element (i.e., two consecutive commas).  This
+   * takes a single argument, which is the name of the plugin type.
+   */
+  public static final int MSGID_CONFIG_PLUGIN_EMPTY_ELEMENT_IN_ORDER =
+       CATEGORY_MASK_CONFIG | SEVERITY_MASK_SEVERE_WARNING | 664;
+
+
+
+  /**
+   * The message ID for the message that will be used if a plugin order
+   * definition contains multiple wildcard characters.  This takes a single
+   * argument, which is the name of the plugin type.
+   */
+  public static final int MSGID_CONFIG_PLUGIN_MULTIPLE_WILDCARDS_IN_ORDER =
+       CATEGORY_MASK_CONFIG | SEVERITY_MASK_SEVERE_WARNING | 665;
+
+
+
+  /**
+   * The message ID for the message that will be used if a plugin is listed
+   * multiple times in the plugin order.  This takes two arguments, which are
+   * the plugin type and the plugin name.
+   */
+  public static final int MSGID_CONFIG_PLUGIN_LISTED_MULTIPLE_TIMES =
+       CATEGORY_MASK_CONFIG | SEVERITY_MASK_SEVERE_WARNING | 666;
+
+
+
+  /**
+   * The message ID for the message that will be used if a plugin order does
+   * not contain a wildcard.  This takes a single argument, which is the name of
+   * the plugin type.
+   */
+  public static final int MSGID_CONFIG_PLUGIN_ORDER_NO_WILDCARD =
+       CATEGORY_MASK_CONFIG | SEVERITY_MASK_SEVERE_WARNING | 667;
+
+
+
 
   /**
    * Associates a set of generic messages with the message IDs defined in this
@@ -8265,6 +8305,27 @@
                     "instance of class %s as a Directory Server plugin using " +
                     "the information in configuration entry %s:  %s.  This " +
                     "plugin will be disabled");
+    registerMessage(MSGID_CONFIG_PLUGIN_EMPTY_ELEMENT_IN_ORDER,
+                    "The plugin order definition for plugins of type %s " +
+                    "contains an empty element.  This may cause the plugin " +
+                    "order to be evaluated incorrectly");
+    registerMessage(MSGID_CONFIG_PLUGIN_MULTIPLE_WILDCARDS_IN_ORDER,
+                    "The plugin order definition for plugins of type %s " +
+                    "contains multiple wildcard characters.  All plugin " +
+                    "definitions should contain exactly one wildcard element " +
+                    "to indicate where unmatched plugins should be included " +
+                    "in the order, and including multiple wildcards may " +
+                    "cause the plugin order to be evaluated incorrectly");
+    registerMessage(MSGID_CONFIG_PLUGIN_LISTED_MULTIPLE_TIMES,
+                    "The plugin order definition for plugins of type %s " +
+                    "includes multiple references to the '%s' plugin.  This " +
+                    "may cause the plugin order to be evaluated incorrectly");
+    registerMessage(MSGID_CONFIG_PLUGIN_ORDER_NO_WILDCARD,
+                    "The plugin order definition for plugins of type %s " +
+                    "does not include a wildcard element to indicate where " +
+                    "unmatched plugins should be included in the order.  The " +
+                    "server will default to invoking all unnamed plugins " +
+                    "after set of named plugins");
     registerMessage(MSGID_CONFIG_PLUGIN_CLASS_ACTION_REQUIRED,
                     "The requested change in the plugin class name from %s " +
                     "to %s in configuration entry %s cannot be dynamically " +

--
Gitblit v1.10.0