From c0a5d19fa897c532ced3e13e01f18f869270e9a0 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 26 Mar 2015 16:01:25 +0000
Subject: [PATCH] Pass ServerContext object down method calls to the pluggable backend Importer class.
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
index 8b14cbb..c13937e 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
@@ -60,6 +60,7 @@
import org.opends.server.backends.pluggable.spi.WriteableTransaction;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.SearchOperation;
+import org.opends.server.core.ServerContext;
import org.opends.server.types.DN;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.Entry;
@@ -175,13 +176,14 @@
*
* @param importConfig
* The configuration to use when performing the import.
+ * @param serverContext The server context
* @return information about the result of the import processing.
* @throws DirectoryException
* If a problem occurs while performing the LDIF import.
*/
- LDIFImportResult importLDIF(LDIFImportConfig importConfig) throws DirectoryException
+ LDIFImportResult importLDIF(LDIFImportConfig importConfig, ServerContext serverContext) throws DirectoryException
{//TODO JNR may call importLDIFWithSuccessiveAdds(importConfig) depending on configured import strategy
- return importLDIFWithOnDiskMerge(importConfig);
+ return importLDIFWithOnDiskMerge(importConfig, serverContext);
}
private LDIFImportResult importLDIFWithSuccessiveAdds(LDIFImportConfig importConfig) throws DirectoryException
@@ -312,11 +314,11 @@
timerService.awaitTermination(20, TimeUnit.SECONDS);
}
- private LDIFImportResult importLDIFWithOnDiskMerge(final LDIFImportConfig importConfig) throws DirectoryException
+ private LDIFImportResult importLDIFWithOnDiskMerge(final LDIFImportConfig importConfig, ServerContext serverContext) throws DirectoryException
{
try
{
- final Importer importer = new Importer(importConfig, (PersistitBackendCfg) config); // TODO JNR remove cast
+ final Importer importer = new Importer(importConfig, (PersistitBackendCfg) config, serverContext); // TODO JNR remove cast
return importer.processImport(this);
}
catch (DirectoryException e)
--
Gitblit v1.10.0