From 79456ab528b185983884c14443e0fe64425874da Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 07 Jul 2016 13:03:32 +0000
Subject: [PATCH] Partial OPENDJ-2625 Convert all code that uses JNDI to use the SDK instead
---
opendj-server-legacy/src/main/java/org/opends/admin/ads/SuffixDescriptor.java | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/admin/ads/SuffixDescriptor.java b/opendj-server-legacy/src/main/java/org/opends/admin/ads/SuffixDescriptor.java
index d275675..bd890e8 100644
--- a/opendj-server-legacy/src/main/java/org/opends/admin/ads/SuffixDescriptor.java
+++ b/opendj-server-legacy/src/main/java/org/opends/admin/ads/SuffixDescriptor.java
@@ -12,13 +12,15 @@
* information: "Portions Copyright [year] [name of copyright owner]".
*
* Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2015 ForgeRock AS.
+ * Portions Copyright 2015-2016 ForgeRock AS.
*/
package org.opends.admin.ads;
import java.util.HashSet;
import java.util.Set;
+import org.forgerock.opendj.ldap.DN;
+
/**
* The object of this class represent a topology of replicas across servers that
* have the same suffix DN. If there is more than one replica on the suffix, the
@@ -26,7 +28,7 @@
*/
public class SuffixDescriptor
{
- private String suffixDN;
+ private DN suffixDN;
private final Set<ReplicaDescriptor> replicas = new HashSet<>();
/**
@@ -34,7 +36,17 @@
*
* @return the DN associated with this suffix descriptor.
*/
- public String getDN()
+ public String getDN() // FIXME change return type to DN
+ {
+ return suffixDN.toString();
+ }
+
+ /**
+ * Returns the DN associated with this suffix descriptor.
+ *
+ * @return the DN associated with this suffix descriptor.
+ */
+ public DN getDnAsDn()
{
return suffixDN;
}
@@ -45,7 +57,7 @@
* @param suffixDN
* the DN associated with this suffix descriptor.
*/
- public void setDN(String suffixDN)
+ public void setDN(DN suffixDN)
{
this.suffixDN = suffixDN;
}
@@ -109,7 +121,6 @@
{
buf.append("-").append(replica.getServer().getId());
}
-
return buf.toString();
}
}
--
Gitblit v1.10.0