| | |
| | | // 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 = entryDN.getParentDNInSuffix(); |
| | | DN parentDN = DirectoryServer.getParentDNInSuffix(entryDN); |
| | | if (parentDN == null) |
| | | { |
| | | return -1; |
| | |
| | | } |
| | | return count; |
| | | } |
| | | else if (backupBaseDN.equals(parentDN.getParentDNInSuffix())) |
| | | else if (backupBaseDN.equals(DirectoryServer.getParentDNInSuffix(parentDN))) |
| | | { |
| | | return 0; |
| | | } |
| | |
| | | // 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 = entryDN.getParentDNInSuffix(); |
| | | DN parentDN = DirectoryServer.getParentDNInSuffix(entryDN); |
| | | if (parentDN == null) |
| | | { |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, |
| | |
| | | { |
| | | return getBackupDirectoryEntry(entryDN); |
| | | } |
| | | else if (backupBaseDN.equals(parentDN.getParentDNInSuffix())) |
| | | else if (backupBaseDN.equals(DirectoryServer.getParentDNInSuffix(parentDN))) |
| | | { |
| | | return getBackupEntry(entryDN); |
| | | } |
| | |
| | | String backupID = idValue.toString(); |
| | | |
| | | // Next, get the backup directory from the parent DN. |
| | | DN parentDN = entryDN.getParentDNInSuffix(); |
| | | DN parentDN = DirectoryServer.getParentDNInSuffix(entryDN); |
| | | if (parentDN == null) { |
| | | throw newConstraintViolation(ERR_BACKUP_NO_BACKUP_PARENT_DN.get(entryDN)); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | else if (backupBaseDN.equals(parentDN = baseDN.getParentDNInSuffix())) |
| | | else if (backupBaseDN.equals(parentDN = DirectoryServer.getParentDNInSuffix(baseDN))) |
| | | { |
| | | Entry backupDirEntry = getBackupDirectoryEntry(baseDN); |
| | | |
| | |
| | | else |
| | | { |
| | | if (parentDN == null |
| | | || !backupBaseDN.equals(parentDN.getParentDNInSuffix())) |
| | | || !backupBaseDN.equals(DirectoryServer.getParentDNInSuffix(parentDN))) |
| | | { |
| | | LocalizableMessage message = ERR_BACKUP_NO_SUCH_ENTRY.get(backupBaseDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, message); |