String[] vlvIndexNames = db.listLocalDBVLVIndexes();
try
{
for (int j=0; j<vlvIndexNames.length; j++)
{
LocalDBVLVIndexCfg index =
db.getLocalDBVLVIndex(vlvIndexNames[j]);
String s = index.getSortOrder();
List<VLVSortOrder> sortOrder = getVLVSortOrder(s);
vlvIndexes.add(new VLVIndexDescriptor(index.getName(), null,
index.getBaseDN(), index.getScope(), index.getFilter(),
sortOrder, index.getMaxBlockSize()));
}
}
catch (OpenDsException oe)
{
ex.add(oe);
}
}
else if (backend instanceof LDIFBackendCfg)
{
type = BackendDescriptor.Type.LDIF;
}
else if (backend instanceof MemoryBackendCfg)
{
type = BackendDescriptor.Type.MEMORY;
}
else if (backend instanceof BackupBackendCfg)
{
type = BackendDescriptor.Type.BACKUP;
}
else if (backend instanceof MonitorBackendCfg)
{
type = BackendDescriptor.Type.MONITOR;
}
else if (backend instanceof TaskBackendCfg)
{
type = BackendDescriptor.Type.TASK;
}
else
{
type = BackendDescriptor.Type.OTHER;
}
BackendDescriptor desc = new BackendDescriptor(
backend.getBackendId(), baseDNs, indexes, vlvIndexes, -1,
backend.isEnabled(), type);
for (AbstractIndexDescriptor index: indexes)
{
index.setBackend(desc);
}
for (AbstractIndexDescriptor index: vlvIndexes)
{
index.setBackend(desc);
}
bs.add(desc);
}
catch (OpenDsException oe)