From 51b2d1c871e51efa30a8f419718d08be9be19f01 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Thu, 27 May 2010 14:37:37 +0000
Subject: [PATCH] Fix issue #4537, naming changelog entries with changeNumber instead of cn. Improve ECL and tests as well

---
 opends/src/server/org/opends/server/replication/service/ReplicationDomain.java |   41 +++++++++++++++++++++++++++++++++++++++--
 1 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java b/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
index 57f1223..7729aa3 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java
@@ -2445,7 +2445,7 @@
   }
 
   /**
-   * Change the ReplicationDomain parameters.
+   * Change some ReplicationDomain parameters.
    *
    * @param replicationServers  The new list of Replication Servers that this
    *                           domain should now use.
@@ -2473,6 +2473,44 @@
     }
   }
 
+  /**
+   * Change some ReplicationDomain parameters : the ECL include attribute.
+   *
+   * @param newECLInclude The new ECL attribute.
+   */
+  public void changeConfig(Set<String> newECLInclude)
+  {
+    boolean configECLIncludeChanged = false;
+    Set<String>  currentECLInclude = this.getEclInclude(serverID);
+
+    if (newECLInclude.size() != currentECLInclude.size())
+    {
+      configECLIncludeChanged = true;
+    }
+    else
+    {
+      // compare current config and new config
+      for (String attr : currentECLInclude)
+      {
+        if (!newECLInclude.contains(attr))
+        {
+          configECLIncludeChanged = true;
+          break;
+        }
+      }
+    }
+
+    if (configECLIncludeChanged)
+    {
+      // set new config
+      this.setEclInclude(this.serverID, newECLInclude);
+      if (broker != null)
+      {
+        disableService();
+        enableService();
+      }
+    }
+  }
 
   /**
    * This method should trigger an export of the replicated data.
@@ -2918,7 +2956,6 @@
    */
   public Set<String> getEclInclude()
   {
-    System.out.println("cdECLIn=" + crossServersECLIncludes);
     return crossServersECLIncludes;
   }
 

--
Gitblit v1.10.0