From 18bcdc6dd02ec91f32ba9922def2ffb3e4e38073 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 12 Jul 2016 07:38:41 +0000
Subject: [PATCH] Use DNs in dsreplication
---
opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
index e880fb4..785b8de 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
@@ -21,7 +21,6 @@
import static org.opends.messages.QuickSetupMessages.*;
import static org.opends.quicksetup.Installation.*;
-import static org.opends.quicksetup.util.Utils.*;
import static org.opends.server.types.ExistingFileBehavior.*;
import java.io.BufferedReader;
@@ -383,7 +382,7 @@
* @return a ConfiguredReplication object describing what has been configured.
*/
public ConfiguredReplication configureReplication(
- ConnectionWrapper conn, Map<String,Set<String>> replicationServers,
+ ConnectionWrapper conn, Map<DN, Set<String>> replicationServers,
int replicationPort, boolean useSecureReplication, Set<Integer> usedReplicationServerIds,
Set<Integer> usedServerIds)
throws ApplicationException
@@ -513,15 +512,14 @@
{
domains[i] = sync.getReplicationDomain(domainNames[i]);
}
- for (String dn : replicationServers.keySet())
+ for (DN dn : replicationServers.keySet())
{
ReplicationDomainCfgClient domain = null;
boolean isCreated;
String domainName = null;
for (int i = 0; i < domains.length && domain == null; i++)
{
- if (areDnsEqual(dn,
- domains[i].getBaseDN().toString()))
+ if (dn.equals(domains[i].getBaseDN()))
{
domain = domains[i];
domainName = domainNames[i];
@@ -536,7 +534,7 @@
ReplicationDomainCfgDefn.getInstance(), domainName,
new ArrayList<PropertyException>());
domain.setServerId(domainId);
- domain.setBaseDN(DN.valueOf(dn));
+ domain.setBaseDN(dn);
isCreated = true;
}
else
@@ -721,9 +719,9 @@
* @param baseDN the base DN of the domain.
* @return the name to be used for a new replication domain.
*/
- public static String getDomainName(String[] existingDomains, String baseDN)
+ public static String getDomainName(String[] existingDomains, DN baseDN)
{
- String domainName = baseDN;
+ String domainName = baseDN.toString();
boolean nameExists = true;
int j = 0;
while (nameExists)
--
Gitblit v1.10.0