From 9681e2c7eca97e6288d0c7b50178ee28f4955135 Mon Sep 17 00:00:00 2001
From: coulbeck <coulbeck@localhost>
Date: Fri, 11 May 2007 23:27:30 +0000
Subject: [PATCH] Issue 1532: Remove ConfigEntry from Backend API. (DS-1532)

---
 opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java b/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java
index d1bd7a2..00c80f8 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java
@@ -32,7 +32,6 @@
 import static org.opends.server.messages.ToolMessages.*;
 import static org.opends.server.messages.MessageHandler.getMessage;
 import static org.opends.server.util.ServerConstants.DATE_FORMAT_GMT_TIME;
-import static org.opends.server.loggers.ErrorLogger.logError;
 import static org.opends.server.util.StaticUtils.*;
 import static org.opends.server.util.ServerConstants.
      BACKUP_DIRECTORY_DESCRIPTOR_FILE;
@@ -56,6 +55,7 @@
 import org.opends.server.types.Operation;
 import org.opends.server.types.Privilege;
 import org.opends.server.types.ResultCode;
+import org.opends.server.admin.std.server.BackendCfg;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -358,7 +358,7 @@
   private boolean backupBackend(Backend b, File backupLocation)
   {
     // Get the config entry for this backend.
-    ConfigEntry configEntry = configEntries.get(b.getBackendID());
+    BackendCfg cfg = TaskUtils.getConfigEntry(b);
 
 
     // If the directory doesn't exist, then create it.  If it does exist, then
@@ -396,8 +396,7 @@
       }
       else
       {
-        backupDir = new BackupDirectory(backupLocation.getPath(),
-                                        configEntry.getDN());
+        backupDir = new BackupDirectory(backupLocation.getPath(), cfg.dn());
       }
     }
     else
@@ -417,7 +416,7 @@
       }
 
       backupDir = new BackupDirectory(backupLocation.getPath(),
-                                      configEntry.getDN());
+                                      cfg.dn());
     }
 
 
@@ -435,7 +434,7 @@
     try
     {
       DirectoryServer.notifyBackupBeginning(b, backupConfig);
-      b.createBackup(configEntry, backupConfig);
+      b.createBackup(backupConfig);
       DirectoryServer.notifyBackupEnded(b, backupConfig, true);
     }
     catch (DirectoryException de)

--
Gitblit v1.10.0