From 8196da2152209c8c628611aeeb4adae32079921e Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 25 Nov 2015 15:09:53 +0000
Subject: [PATCH] OPENDJ-2337 Remove old JE local-db backend code and JE changelog once we are happy with the new implementations
---
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/VLVIndexPanel.java | 44 +++-----------------------------------------
1 files changed, 3 insertions(+), 41 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/VLVIndexPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/VLVIndexPanel.java
index 3bdec8d..36ef0cf 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/VLVIndexPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/VLVIndexPanel.java
@@ -77,13 +77,9 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.client.ldap.JNDIDirContextAdaptor;
import org.opends.server.admin.client.ldap.LDAPManagementContext;
-import org.opends.server.admin.std.client.BackendCfgClient;
import org.opends.server.admin.std.client.BackendVLVIndexCfgClient;
-import org.opends.server.admin.std.client.LocalDBBackendCfgClient;
-import org.opends.server.admin.std.client.LocalDBVLVIndexCfgClient;
import org.opends.server.admin.std.client.PluggableBackendCfgClient;
import org.opends.server.admin.std.client.RootCfgClient;
-import org.opends.server.backends.jeb.RemoveOnceLocalDBBackendIsPluggable;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.DN;
import org.opends.server.types.OpenDsException;
@@ -701,14 +697,7 @@
{
final ManagementContext mCtx = LDAPManagementContext.createFromContext(JNDIDirContextAdaptor.adapt(ctx));
final RootCfgClient root = mCtx.getRootConfiguration();
- final BackendCfgClient backend = root.getBackend(backendID);
-
- if (backend instanceof LocalDBBackendCfgClient)
- {
- modifyLocalDBVLVIndexOnline((LocalDBBackendCfgClient) backend);
- return;
- }
- modifyBackendVLVIndexOnline((PluggableBackendCfgClient) backend);
+ modifyBackendVLVIndexOnline((PluggableBackendCfgClient) root.getBackend(backendID));
}
private void modifyBackendVLVIndexOnline(final PluggableBackendCfgClient backend) throws OpenDsException
@@ -737,33 +726,6 @@
index.commit();
}
- @RemoveOnceLocalDBBackendIsPluggable
- private void modifyLocalDBVLVIndexOnline(final LocalDBBackendCfgClient backend) throws OpenDsException
- {
- final LocalDBVLVIndexCfgClient index = backend.getLocalDBVLVIndex(indexName);
- final DN b = DN.valueOf(baseDN);
- if (!indexToModify.getBaseDN().equals(b))
- {
- index.setBaseDN(b);
- }
-
- if (!indexToModify.getFilter().equals(filterValue))
- {
- index.setFilter(filterValue);
- }
-
- if (indexToModify.getScope() != searchScope)
- {
- index.setScope(VLVIndexDescriptor.getLocalDBVLVIndexScope(searchScope));
- }
-
- if (!indexToModify.getSortOrder().equals(sortOrder))
- {
- index.setSortOrder(sortOrderStringValue);
- }
- index.commit();
- }
-
@Override
protected String getCommandLinePath()
{
@@ -818,7 +780,7 @@
private List<String> getDSConfigCommandLineArguments()
{
final List<String> args = new ArrayList<>();
- args.add("set-local-db-vlv-index-prop");
+ args.add("set-backend-vlv-index-prop");
args.add("--backend-name");
args.add(backendID);
@@ -842,7 +804,7 @@
if (indexToModify.getScope() != searchScope)
{
args.add("--set");
- args.add("scope:" + VLVIndexDescriptor.getLocalDBVLVIndexScope(searchScope));
+ args.add("scope:" + VLVIndexDescriptor.getBackendVLVIndexScope(searchScope));
}
if (!indexToModify.getFilter().equals(filterValue))
{
--
Gitblit v1.10.0