From 349333a0c0ad336c28169bb7c543002ed51ec386 Mon Sep 17 00:00:00 2001
From: Yannick Lecaillez <yannick.lecaillez@forgerock.com>
Date: Thu, 10 Mar 2016 13:10:09 +0000
Subject: [PATCH] Cleanup: Removed deprecated append & replace options.
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java | 4 --
opendj-server-legacy/src/main/java/org/opends/server/types/LDIFImportConfig.java | 68 ----------------------------------
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java | 1
3 files changed, 0 insertions(+), 73 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
index ce35cf1..1c1943b 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
@@ -650,10 +650,6 @@
public LDIFImportResult importLDIF(LDIFImportConfig importConfig, ServerContext serverContext)
throws DirectoryException
{
- if (importConfig.appendToExistingData() || importConfig.replaceExistingEntries())
- {
- throw new UnsupportedOperationException("append/replace mode is not supported by this backend.");
- }
RuntimeInformation.logInfo();
// If the rootContainer is open, the backend is initialized by something else.
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 46795c3..3ed7603 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -3545,7 +3545,6 @@
importConfig = new LDIFImportConfig(input);
importConfig.setIncludeBranches(newLinkedHashSet(getBaseDN()));
- importConfig.setAppendToExistingData(false);
importConfig.setSkipDNValidation(true);
// We should not validate schema for replication
importConfig.setValidateSchema(false);
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/types/LDIFImportConfig.java b/opendj-server-legacy/src/main/java/org/opends/server/types/LDIFImportConfig.java
index 6253bae..5997e7b 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/types/LDIFImportConfig.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/types/LDIFImportConfig.java
@@ -48,12 +48,6 @@
private static final int DEFAULT_BUFFER_SIZE = 8192;
/**
- * Indicates whether to append to the existing data set rather than
- * replacing it.
- */
- private boolean appendToExistingData;
-
- /**
* Indicates whether to include the objectclasses in the entries
* read from the import.
*/
@@ -67,8 +61,6 @@
private boolean isEncrypted;
/** Indicates whether to clear all base DNs in a backend. */
private boolean clearBackend;
- /** Indicates whether to replace existing entries when appending data. */
- private boolean replaceExistingEntries;
/** Indicates whether to perform schema validation on the entries read. */
private boolean validateSchema = true;
@@ -448,66 +440,6 @@
new BufferedWriter(new OutputStreamWriter(outputStream));
}
- /**
- * Indicates whether to append to an existing data set or completely
- * replace it.
- *
- * @return <CODE>true</CODE> if the import should append to an
- * existing data set, or <CODE>false</CODE> if not.
- */
- public boolean appendToExistingData()
- {
- return appendToExistingData;
- }
-
-
-
- /**
- * Specifies whether to append to an existing data set or completely
- * replace it.
- *
- * @param appendToExistingData Indicates whether to append to an
- * existing data set or completely
- * replace it.
- */
- public void setAppendToExistingData(boolean appendToExistingData)
- {
- this.appendToExistingData = appendToExistingData;
- }
-
-
-
- /**
- * Indicates whether to replace the existing entry if a duplicate is
- * found or to reject the new entry. This only applies when
- * appending to an existing data set.
- *
- * @return <CODE>true</CODE> if an existing entry should be
- * replaced with the new entry from the provided data set,
- * or <CODE>false</CODE> if the new entry should be
- * rejected.
- */
- public boolean replaceExistingEntries()
- {
- return replaceExistingEntries;
- }
-
-
-
- /**
- * Specifies whether to replace the existing entry if a duplicate is
- * found or to reject the new entry. This only applies when
- * appending to an existing data set.
- *
- * @param replaceExistingEntries Indicates whether to replace the
- * existing entry if a duplicate is
- * found or to reject the new entry.
- */
- public void setReplaceExistingEntries(boolean replaceExistingEntries)
- {
- this.replaceExistingEntries = replaceExistingEntries;
- }
-
/**
--
Gitblit v1.10.0