From 7e584b107ad3ee69c2117333f882d69cd4b1aac8 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Fri, 29 May 2015 07:42:09 +0000
Subject: [PATCH] OPENDJ-2044 CR-7087 Replication Setup GUI
---
opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/SuffixesToReplicateOptions.java | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/SuffixesToReplicateOptions.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/SuffixesToReplicateOptions.java
index a4984b7..77d1a49 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/SuffixesToReplicateOptions.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/SuffixesToReplicateOptions.java
@@ -26,10 +26,13 @@
*/
package org.opends.quicksetup.installer;
+import java.util.HashMap;
import java.util.LinkedHashSet;
+import java.util.Map;
import java.util.Set;
import org.opends.admin.ads.SuffixDescriptor;
+import org.opends.server.tools.BackendTypeHelper.BackendTypeUIAdapter;
/**
* This class is used to provide a data model for the Suffix to Replicate
@@ -56,6 +59,7 @@
private Type type;
private Set<SuffixDescriptor> availableSuffixes;
private Set<SuffixDescriptor> suffixesToReplicate;
+ private Map<String, BackendTypeUIAdapter> backendsToReplicate;
/**
* Constructor for the SuffixesToReplicateOptions object.
@@ -70,9 +74,29 @@
public SuffixesToReplicateOptions(Type type, Set<SuffixDescriptor> availableSuffixes,
Set<SuffixDescriptor> suffixesToReplicate)
{
+ this(type, availableSuffixes, suffixesToReplicate, new HashMap<String, BackendTypeUIAdapter>());
+ }
+
+ /**
+ * Constructor for the SuffixesToReplicateOptions object.
+ *
+ * @param type
+ * the Type of DataReplicationOptions.
+ * @param availableSuffixes
+ * The set of suffixes which are available for replication.
+ * @param suffixesToReplicate
+ * The set of suffixes which user wants to replicate.
+ * @param backendsToReplicate
+ * The map with backend name as keys and their associated backend type
+ * as value.
+ */
+ public SuffixesToReplicateOptions(Type type, Set<SuffixDescriptor> availableSuffixes,
+ Set<SuffixDescriptor> suffixesToReplicate, Map<String, BackendTypeUIAdapter> backendsToReplicate)
+ {
this.type = type;
this.availableSuffixes = new LinkedHashSet<>(availableSuffixes);
this.suffixesToReplicate = new LinkedHashSet<>(suffixesToReplicate);
+ this.backendsToReplicate = new HashMap<>(backendsToReplicate);
}
/**
@@ -105,4 +129,14 @@
{
return suffixesToReplicate;
}
+
+ /**
+ * Returns a map which associate backend names and backend types.
+ *
+ * @return A map which associate backend names and backend types.
+ */
+ public Map<String, BackendTypeUIAdapter> getSuffixBackendTypes()
+ {
+ return backendsToReplicate;
+ }
}
--
Gitblit v1.10.0