From 35af51f9683f5ef8cec66baca7b89aa1e1cbc44e 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)

---
 opends/src/server/org/opends/server/tools/BackUpDB.java |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/BackUpDB.java b/opends/src/server/org/opends/server/tools/BackUpDB.java
index c80462a..e72074d 100644
--- a/opends/src/server/org/opends/server/tools/BackUpDB.java
+++ b/opends/src/server/org/opends/server/tools/BackUpDB.java
@@ -38,7 +38,6 @@
 import java.util.TimeZone;
 
 import org.opends.server.api.Backend;
-import org.opends.server.config.ConfigEntry;
 import org.opends.server.config.ConfigException;
 import org.opends.server.core.CoreConfigManager;
 import org.opends.server.core.DirectoryServer;
@@ -66,7 +65,7 @@
 import static org.opends.server.util.StaticUtils.*;
 import org.opends.server.util.StaticUtils;
 import static org.opends.server.tools.ToolConstants.*;
-
+import org.opends.server.admin.std.server.BackendCfg;
 
 
 /**
@@ -366,8 +365,8 @@
     {
       try
       {
-        directoryServer.bootstrapClient();
-        directoryServer.initializeJMX();
+        DirectoryServer.bootstrapClient();
+        DirectoryServer.initializeJMX();
       }
       catch (Exception e)
       {
@@ -506,15 +505,15 @@
     // Get information about the backends defined in the server, and determine
     // whether we are backing up multiple backends or a single backend.
     ArrayList<Backend>     backendList = new ArrayList<Backend>();
-    ArrayList<ConfigEntry> entryList   = new ArrayList<ConfigEntry>();
+    ArrayList<BackendCfg>  entryList   = new ArrayList<BackendCfg>();
     ArrayList<List<DN>>    dnList      = new ArrayList<List<DN>>();
     BackendToolUtils.getBackends(backendList, entryList, dnList);
     int numBackends = backendList.size();
 
     boolean multiple;
     ArrayList<Backend> backendsToArchive = new ArrayList<Backend>(numBackends);
-    HashMap<String,ConfigEntry> configEntries =
-         new HashMap<String,ConfigEntry>(numBackends);
+    HashMap<String,BackendCfg> configEntries =
+         new HashMap<String,BackendCfg>(numBackends);
     if (backUpAll.isPresent())
     {
       for (int i=0; i < numBackends; i++)
@@ -629,7 +628,7 @@
 
 
       // Get the config entry for this backend.
-      ConfigEntry configEntry = configEntries.get(b.getBackendID());
+      BackendCfg configEntry = configEntries.get(b.getBackendID());
 
 
       // Get the path to the directory to use for this backup.  If we will be
@@ -650,7 +649,7 @@
 
       // If the directory doesn't exist, then create it.  If it does exist, then
       // see if it has a backup descriptor file.
-      BackupDirectory backupDir = null;
+      BackupDirectory backupDir;
       backupDirFile = new File(backupDirPath);
       if (backupDirFile.exists())
       {
@@ -731,7 +730,7 @@
         }
         else
         {
-          backupDir = new BackupDirectory(backupDirPath, configEntry.getDN());
+          backupDir = new BackupDirectory(backupDirPath, configEntry.dn());
         }
       }
       else
@@ -773,7 +772,7 @@
           continue;
         }
 
-        backupDir = new BackupDirectory(backupDirPath, configEntry.getDN());
+        backupDir = new BackupDirectory(backupDirPath, configEntry.dn());
       }
 
 
@@ -826,7 +825,7 @@
       // Perform the backup.
       try
       {
-        b.createBackup(configEntry, backupConfig);
+        b.createBackup(backupConfig);
       }
       catch (DirectoryException de)
       {

--
Gitblit v1.10.0