From 59b4905a66a5db370e6d0de5f7cb6dcd314ef443 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Sun, 26 Aug 2007 03:16:07 +0000
Subject: [PATCH] This commit includes all the code for the first version of the replication tools.  As they require further testing the command line associated with them has not been committed.

---
 opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
index 6464814..fe56f11 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
@@ -572,7 +572,12 @@
                 ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.getId()) != -1;
   }
 
-  private int getReplicationId(Set<Integer> usedIds)
+  /**
+   * Returns the ID to be used for a new replication server or domain.
+   * @param usedIds the list of already used ids.
+   * @return the ID to be used for a new replication server or domain.
+   */
+  public static int getReplicationId(Set<Integer> usedIds)
   {
     Random r = new Random();
     int id = 0;
@@ -583,7 +588,13 @@
     return id;
   }
 
-  private String getDomainName(String[] existingDomains, int newDomainId)
+  /**
+   * Returns the name to be used for a new replication domain.
+   * @param existingDomains the existing domains names.
+   * @param newDomainId the new domain replication id.
+   * @return the name to be used for a new replication domain.
+   */
+  public static String getDomainName(String[] existingDomains, int newDomainId)
   {
     String domainName = DOMAIN_BASE_NAME+newDomainId;
     boolean nameExists = true;

--
Gitblit v1.10.0