* @throws OpenDsException if an error occurs.
*/
private void deleteBaseDNs(Set<BaseDNDescriptor> baseDNs)
throws OpenDsException
{
BackendDescriptor backend = baseDNs.iterator().next().getBackend();
SortedSet<DN> oldBaseDNs = new TreeSet<DN>();
for (BaseDNDescriptor baseDN : backend.getBaseDns())
{
oldBaseDNs.add(baseDN.getDn());
}
LinkedList<DN> newBaseDNs = new LinkedList<DN>();
newBaseDNs.addAll(oldBaseDNs);
ArrayList<DN> dnsToRemove = new ArrayList<DN>();
for (BaseDNDescriptor baseDN : baseDNs)
{
dnsToRemove.add(baseDN.getDn());
}
newBaseDNs.removeAll(dnsToRemove);
String backendName = backend.getBackendID();
String dn = Utilities.getRDNString("ds-cfg-backend-id", backendName)+
",cn=Backends,cn=config";
ConfigEntry configEntry =
DirectoryServer.getConfigHandler().getConfigEntry(DN.decode(dn));