From 94bbd5bb7c20a490558d8ec97d1be7e3dc492a42 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sun, 09 Sep 2007 23:08:09 +0000
Subject: [PATCH] Update the server to provide a basic framework for controlling when plugins will be invoked. There are two basic changes:
---
opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java | 44 ++++++++++++++++++++++++++++++++++++--------
1 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java b/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
index 903ae3c..255cd3f 100644
--- a/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
+++ b/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
@@ -2416,8 +2416,15 @@
// Indicate that it is now too late to attempt to cancel the operation.
localOp.setCancelResult(CancelResult.TOO_LATE);
- // Invoke the post-operation modify plugins.
- if (! skipPostOperation)
+ // Invoke the post-operation or post-synchronization modify plugins.
+ if (localOp.isSynchronizationOperation())
+ {
+ if (localOp.getResultCode() == ResultCode.SUCCESS)
+ {
+ pluginConfigManager.invokePostSynchronizationModifyPlugins(localOp);
+ }
+ }
+ else if (! skipPostOperation)
{
// FIXME -- Should this also be done while holding the locks?
PostOperationPluginResult postOpResult =
@@ -5893,8 +5900,15 @@
localOp.setCancelResult(CancelResult.TOO_LATE);
- // Invoke the post-operation add plugins.
- if (! skipPostOperation)
+ // Invoke the post-operation or post-synchronization add plugins.
+ if (localOp.isSynchronizationOperation())
+ {
+ if (localOp.getResultCode() == ResultCode.SUCCESS)
+ {
+ pluginConfigManager.invokePostSynchronizationAddPlugins(localOp);
+ }
+ }
+ else if (! skipPostOperation)
{
// FIXME -- Should this also be done while holding the locks?
PostOperationPluginResult postOpResult =
@@ -6672,8 +6686,15 @@
localOp.setCancelResult(CancelResult.TOO_LATE);
- // Invoke the post-operation delete plugins.
- if (! skipPostOperation)
+ // Invoke the post-operation or post-synchronization delete plugins.
+ if (localOp.isSynchronizationOperation())
+ {
+ if (localOp.getResultCode() == ResultCode.SUCCESS)
+ {
+ pluginConfigManager.invokePostSynchronizationDeletePlugins(localOp);
+ }
+ }
+ else if (! skipPostOperation)
{
PostOperationPluginResult postOperationResult =
pluginConfigManager.invokePostOperationDeletePlugins(localOp);
@@ -8498,8 +8519,15 @@
op.setCancelResult(CancelResult.TOO_LATE);
- // Invoke the post-operation modify DN plugins.
- if (! skipPostOperation)
+ // Invoke the post-operation or post-synchronization modify DN plugins.
+ if (op.isSynchronizationOperation())
+ {
+ if (op.getResultCode() == ResultCode.SUCCESS)
+ {
+ pluginConfigManager.invokePostSynchronizationModifyDNPlugins(op);
+ }
+ }
+ else if (! skipPostOperation)
{
PostOperationPluginResult postOperationResult =
pluginConfigManager.invokePostOperationModifyDNPlugins(op);
--
Gitblit v1.10.0