From 97050c54efee9d0cc89afb5fb61b9a1c67f73f6a Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Wed, 16 Nov 2016 19:28:22 +0000
Subject: [PATCH] OPENDJ-3460 Improve management of subordinate backend and naming contexts

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java
index f4c4e14..fc23d7f 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java
@@ -373,7 +373,7 @@
     // If so, then it must point to a backup directory.  Otherwise, it must be
     // two levels below the backup base entry and must point to a specific
     // backup.
-    DN parentDN = DirectoryServer.getParentDNInSuffix(entryDN);
+    DN parentDN = serverContext.getBackendConfigManager().getParentDNInSuffix(entryDN);
     if (parentDN == null)
     {
       return -1;
@@ -400,7 +400,7 @@
       }
       return count;
     }
-    else if (backupBaseDN.equals(DirectoryServer.getParentDNInSuffix(parentDN)))
+    else if (backupBaseDN.equals(serverContext.getBackendConfigManager().getParentDNInSuffix(parentDN)))
     {
       return 0;
     }
@@ -431,7 +431,7 @@
     // If so, then it must point to a backup directory.  Otherwise, it must be
     // two levels below the backup base entry and must point to a specific
     // backup.
-    DN parentDN = DirectoryServer.getParentDNInSuffix(entryDN);
+    DN parentDN = serverContext.getBackendConfigManager().getParentDNInSuffix(entryDN);
     if (parentDN == null)
     {
       throw new DirectoryException(ResultCode.NO_SUCH_OBJECT,
@@ -441,7 +441,7 @@
     {
       return getBackupDirectoryEntry(entryDN);
     }
-    else if (backupBaseDN.equals(DirectoryServer.getParentDNInSuffix(parentDN)))
+    else if (backupBaseDN.equals(serverContext.getBackendConfigManager().getParentDNInSuffix(parentDN)))
     {
       return getBackupEntry(entryDN);
     }
@@ -546,7 +546,7 @@
     String backupID = idValue.toString();
 
     // Next, get the backup directory from the parent DN.
-    DN parentDN = DirectoryServer.getParentDNInSuffix(entryDN);
+    DN parentDN = serverContext.getBackendConfigManager().getParentDNInSuffix(entryDN);
     if (parentDN == null) {
       throw newConstraintViolation(ERR_BACKUP_NO_BACKUP_PARENT_DN.get(entryDN));
     }
@@ -754,7 +754,7 @@
         }
       }
     }
-    else if (backupBaseDN.equals(parentDN = DirectoryServer.getParentDNInSuffix(baseDN)))
+    else if (backupBaseDN.equals(parentDN = serverContext.getBackendConfigManager().getParentDNInSuffix(baseDN)))
     {
       Entry backupDirEntry = getBackupDirectoryEntry(baseDN);
 
@@ -774,7 +774,7 @@
     else
     {
       if (parentDN == null
-          || !backupBaseDN.equals(DirectoryServer.getParentDNInSuffix(parentDN)))
+          || !backupBaseDN.equals(serverContext.getBackendConfigManager().getParentDNInSuffix(parentDN)))
       {
         LocalizableMessage message = ERR_BACKUP_NO_SUCH_ENTRY.get(backupBaseDN);
         throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, message);

--
Gitblit v1.10.0