From a09e50d8d41c0f50c486742f4cc2343083c635e3 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 25 Jun 2010 09:25:49 +0000
Subject: [PATCH] Fixes issues #4552 #4557, making sure plugins and internal services are properly handling subtree move or delete. The changes particularly resolve problems raised by the community with the referential integrity and the isMemberOf plug-ins. Unit-tests have been updated to cover those cases

---
 opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java b/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java
index 940ff5d..eaab22e 100644
--- a/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java
+++ b/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Copyright 2006-2010 Sun Microsystems, Inc.
  */
 package org.opends.server.api.plugin;
 import org.opends.messages.Message;
@@ -35,6 +35,7 @@
 import org.opends.server.admin.std.server.PluginCfg;
 import org.opends.server.api.ClientConnection;
 import org.opends.server.config.ConfigException;
+import org.opends.server.core.DeleteOperation;
 import org.opends.server.types.*;
 import org.opends.server.types.operation.*;
 
@@ -1115,6 +1116,28 @@
 
 
   /**
+   * Performs any necessary processing that should be done whenever a
+   * subordinate entry is deleted as part of subtree delete operation.
+   *
+   * @param  deleteOperation  The delete operation with which the
+   *                          subordinate entry is associated.
+   * @param  entry            The subordinate entry being deleted.
+   *
+   * @return Information about the result of the plugin processing.
+   */
+  public PluginResult.SubordinateDelete
+       processSubordinateDelete(DeleteOperation
+         deleteOperation, Entry entry)
+  {
+    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
+            String.valueOf(pluginDN),
+            PluginType.SUBORDINATE_MODIFY_DN.getName());
+    throw new UnsupportedOperationException(message.toString());
+  }
+
+
+
+  /**
    * Performs any necessary processing that should be done after the
    * Directory Server has completed the core processing for a modify
    * DN operation but before the response has been sent to the client.

--
Gitblit v1.10.0