From bb40b9a02cf40af0349d8e3576f51133d264d4b1 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 10 Oct 2006 15:23:18 +0000
Subject: [PATCH] Make all of the plugin result objects immutable, and create a default SUCCESS instance for each of them that may be used if all processing completed successfully.  Update all uses of the plugin result objects to use this SUCCESS instance where applicable.

---
 opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java |   59 +++++++++++++----------------------------------------------
 1 files changed, 13 insertions(+), 46 deletions(-)

diff --git a/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java b/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java
index ae2b6d7..97555b7 100644
--- a/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java
@@ -46,13 +46,22 @@
 
 
 
+  /**
+   * An LDIF plugin result instance that indicates all processing was
+   * successful.
+   */
+  public static final LDIFPluginResult SUCCESS =
+       new LDIFPluginResult();
+
+
+
   // Indicates whether any further LDIF import/export plugins should
   // be invoked for the associated entry.
-  private boolean continuePluginProcessing;
+  private final boolean continuePluginProcessing;
 
   // Indicates whether the associated entry should still be
   // imported/exported.
-  private boolean continueEntryProcessing;
+  private final boolean continueEntryProcessing;
 
 
 
@@ -61,12 +70,9 @@
    * this case, it will indicate that all processing should continue
    * as normal.
    */
-  public LDIFPluginResult()
+  private LDIFPluginResult()
   {
-    assert debugConstructor(CLASS_NAME);
-
-    this.continuePluginProcessing = true;
-    this.continueEntryProcessing  = true;
+    this(true, true);
   }
 
 
@@ -114,26 +120,6 @@
 
 
   /**
-   * Specifies whether any further LDIF import/export plugins should
-   * be invoked for the associated entry.
-   *
-   * @param  continuePluginProcessing  Specifies whether any further
-   *                                   LDIF import/export plugins
-   *                                   should be invoked for the
-   *                                   associated entry.
-   */
-  public void setContinuePluginProcessing(
-                   boolean continuePluginProcessing)
-  {
-    assert debugEnter(CLASS_NAME, "setContinuePluginProcessing",
-                      String.valueOf(continuePluginProcessing));
-
-    this.continuePluginProcessing = continuePluginProcessing;
-  }
-
-
-
-  /**
    * Indicates whether the associated entry should still be
    * imported/exported.
    *
@@ -150,25 +136,6 @@
 
 
   /**
-   * Specifies whether the associated entry should still be
-   * imported/exported.
-   *
-   * @param  continueEntryProcessing  Specifies whether the associated
-   *                                  entry should still be
-   *                                  imported/exported.
-   */
-  public void setContinueEntryProcessing(
-                   boolean continueEntryProcessing)
-  {
-    assert debugEnter(CLASS_NAME, "setContinueEntryProcessing",
-                      String.valueOf(continueEntryProcessing));
-
-    this.continueEntryProcessing = continueEntryProcessing;
-  }
-
-
-
-  /**
    * Retrieves a string representation of this post-response plugin
    * result.
    *

--
Gitblit v1.10.0