From 664eac71955fcceba752801c55b091a197546b84 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 05 Aug 2016 19:09:24 +0000
Subject: [PATCH] Partial OPENDJ-2625 Convert all code that uses JNDI to use the SDK instead
---
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java | 6 +-
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LoginPanel.java | 6 +-
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/nodes/BrowserNodeInfo.java | 27 ++++-----
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java | 6 +-
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/VLVIndexPanel.java | 2
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/Task.java | 2
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java | 10 +-
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java | 13 ++--
opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java | 4
opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/LoginDialog.java | 2
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewVLVIndexPanel.java | 4
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RootMonitoringPanel.java | 6 +-
opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCli.java | 2
opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheException.java | 2
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java | 4
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java | 7 -
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java | 16 ++--
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ResetUserPasswordTask.java | 4
18 files changed, 58 insertions(+), 65 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheException.java b/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheException.java
index 5294922..3a88b66 100644
--- a/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheException.java
+++ b/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheException.java
@@ -41,7 +41,7 @@
GENERIC_CREATING_CONNECTION,
/** Error reading the configuration of a particular server. */
GENERIC_READING_SERVER,
- /** The DN provided in the DirContext of ADS is not of a global administrator. */
+ /** The DN provided in the connection of ADS is not of a global administrator. */
NOT_GLOBAL_ADMINISTRATOR,
/** Not enough permissions to read the server configuration. */
NO_PERMISSIONS,
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
index 95b557a..42cc3a8 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
@@ -54,7 +54,7 @@
import org.opends.guitools.controlpanel.task.Task;
import org.opends.guitools.controlpanel.task.Task.State;
import org.opends.guitools.controlpanel.task.Task.Type;
-import org.opends.guitools.controlpanel.util.ConfigFromDirContext;
+import org.opends.guitools.controlpanel.util.ConfigFromConnection;
import org.opends.guitools.controlpanel.util.ConfigFromFile;
import org.opends.guitools.controlpanel.util.ConfigReader;
import org.opends.guitools.controlpanel.util.Utilities;
@@ -316,7 +316,7 @@
* @throws LdapException
* if there is a problem updating the connection pool.
*/
- public void setUserDataDirContext(ConnectionWrapper conn) throws LdapException
+ public void setUserDataConnection(ConnectionWrapper conn) throws LdapException
{
if (userDataConn != null)
{
@@ -334,7 +334,7 @@
*
* @return the connection to be used by the ControlPanelInfo to retrieve user data.
*/
- public ConnectionWrapper getUserDataDirContext()
+ public ConnectionWrapper getUserDataConnection()
{
return userDataConn;
}
@@ -453,7 +453,7 @@
{
if (isLocal)
{
- connWrapper = Utilities.getAdminDirContext(this, lastWorkingBindDN, lastWorkingBindPwd);
+ connWrapper = Utilities.getAdminConnection(this, lastWorkingBindDN, lastWorkingBindPwd);
}
else if (lastRemoteHostPort != null)
{
@@ -507,13 +507,13 @@
if (reader != null)
{
- desc.setAuthenticated(reader instanceof ConfigFromDirContext);
+ desc.setAuthenticated(reader instanceof ConfigFromConnection);
desc.setJavaVersion(reader.getJavaVersion());
desc.setOpenConnections(reader.getOpenConnections());
desc.setTaskEntries(reader.getTaskEntries());
- if (reader instanceof ConfigFromDirContext)
+ if (reader instanceof ConfigFromConnection)
{
- ConfigFromDirContext rCtx = (ConfigFromDirContext)reader;
+ ConfigFromConnection rCtx = (ConfigFromConnection)reader;
desc.setRootMonitor(rCtx.getRootMonitor());
desc.setEntryCachesMonitor(rCtx.getEntryCaches());
desc.setJvmMemoryUsageMonitor(rCtx.getJvmMemoryUsage());
@@ -565,7 +565,7 @@
private ConfigReader newRemoteConfigReader()
{
- ConfigFromDirContext reader = new ConfigFromDirContext();
+ ConfigFromConnection reader = new ConfigFromConnection();
reader.setIsLocal(isLocal);
reader.readConfiguration(connWrapper);
return reader;
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
index 2647945..9672920 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
@@ -34,7 +34,7 @@
import org.forgerock.opendj.ldap.responses.SearchResultEntry;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.ObjectClass;
-import org.opends.guitools.controlpanel.util.ConfigFromDirContext;
+import org.opends.guitools.controlpanel.util.ConfigFromConnection;
import org.opends.quicksetup.UserData;
import org.opends.server.tools.tasks.TaskEntry;
import org.opends.server.types.Schema;
@@ -694,8 +694,8 @@
{
String start = rootMonitor.getAttribute(START_DATE.getAttributeName()).firstValueAsString();
String current = rootMonitor.getAttribute(CURRENT_DATE.getAttributeName()).firstValueAsString();
- Date startTime = ConfigFromDirContext.utcParser.parse(start);
- Date currentTime = ConfigFromDirContext.utcParser.parse(current);
+ Date startTime = ConfigFromConnection.utcParser.parse(start);
+ Date currentTime = ConfigFromConnection.utcParser.parse(current);
return currentTime.getTime() - startTime.getTime();
}
catch (Throwable t)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java
index fca9509..0e39cdd 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java
@@ -256,10 +256,10 @@
* Deletes an index. The code assumes that the server is running and that the
* provided connection is active.
*
+ * @param connWrapper
+ * the connection to the server.
* @param index
* the index to be deleted.
- * @param ctx
- * the connection to the server.
* @throws OpenDsException
* if an error occurs.
*/
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ResetUserPasswordTask.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ResetUserPasswordTask.java
index 40bcc04..02462fb 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ResetUserPasswordTask.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ResetUserPasswordTask.java
@@ -197,9 +197,9 @@
// is what we use to clone connections and to launch scripts.
// The environment will also be used if we want to reconnect.
rebind(getInfo().getConnection());
- if (getInfo().getUserDataDirContext() != null)
+ if (getInfo().getUserDataConnection() != null)
{
- rebind(getInfo().getUserDataDirContext());
+ rebind(getInfo().getUserDataConnection());
}
}
state = State.FINISHED_SUCCESSFULLY;
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/Task.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/Task.java
index 239114b..a7c6af0 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/Task.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/Task.java
@@ -677,7 +677,7 @@
{
ConnectionWrapper conn = useAdminConnector
? getInfo().getConnection()
- : getInfo().getUserDataDirContext();
+ : getInfo().getUserDataConnection();
List<String> args = new ArrayList<>();
if (isServerRunning() && conn != null)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
index e3cf390..b9a0e7f 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
@@ -1194,10 +1194,9 @@
updateNumSubordinateHacker(desc);
if (setConnection)
{
- if (getInfo().getUserDataDirContext() == null)
+ if (getInfo().getUserDataConnection() == null)
{
- ConnectionWrapper connUserData = createUserDataDirContext(conn.getBindDn(), conn.getBindPassword());
- getInfo().setUserDataDirContext(connUserData);
+ getInfo().setUserDataConnection(createUserDataConnection(conn.getBindDn(), conn.getBindPassword()));
}
Runnable runnable = new Runnable()
{
@@ -1206,7 +1205,7 @@
{
ControlPanelInfo info = getInfo();
controller.setConnections(
- info.getServerDescriptor(), info.getConnection(), info.getUserDataDirContext());
+ info.getServerDescriptor(), info.getConnection(), info.getUserDataConnection());
applyButtonClicked();
}
};
@@ -1391,13 +1390,13 @@
* @throws ConfigReadException
* if an error occurs reading the configuration.
*/
- private ConnectionWrapper createUserDataDirContext(final DN bindDN, final String bindPassword)
+ private ConnectionWrapper createUserDataConnection(final DN bindDN, final String bindPassword)
throws IOException, ConfigReadException
{
createdUserDataConn = null;
try
{
- createdUserDataConn = Utilities.getUserDataDirContext(getInfo(), bindDN, bindPassword);
+ createdUserDataConn = Utilities.getUserDataConnection(getInfo(), bindDN, bindPassword);
}
catch (LdapException e)
{
@@ -1520,7 +1519,7 @@
{
logger.info(LocalizableMessage.raw("Accepting certificate presented by host " + host));
getInfo().getTrustManager().acceptCertificate(chain, authType, host);
- createdUserDataConn = createUserDataDirContext(bindDN, bindPassword);
+ createdUserDataConn = createUserDataConnection(bindDN, bindPassword);
}
else
{
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
index 03a336a..52c586c 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
@@ -541,7 +541,7 @@
if (isLocal)
{
usedHostPort = info.getAdminConnectorHostPort();
- conn = Utilities.getAdminDirContext(info, bindDn, bindPwd);
+ conn = Utilities.getAdminConnection(info, bindDn, bindPwd);
}
else
{
@@ -563,7 +563,7 @@
closeInfoConnections();
info.setIsLocal(isLocal);
info.setConnection(conn);
- info.setUserDataDirContext(null);
+ info.setUserDataConnection(null);
info.regenerateDescriptor();
return conn;
} catch (Throwable t)
@@ -913,6 +913,6 @@
private void closeInfoConnections()
{
StaticUtils.close(getInfo().getConnection());
- StaticUtils.close(getInfo().getUserDataDirContext());
+ StaticUtils.close(getInfo().getUserDataConnection());
}
}
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LoginPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LoginPanel.java
index fc488d2..126a256 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LoginPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LoginPanel.java
@@ -188,9 +188,9 @@
{
ControlPanelInfo info = getInfo();
usedHostPort = info.getAdminConnectorHostPort();
- conn = Utilities.getAdminDirContext(info, DN.valueOf(dn.getText()), String.valueOf(pwd.getPassword()));
+ conn = Utilities.getAdminConnection(info, DN.valueOf(dn.getText()), String.valueOf(pwd.getPassword()));
- org.forgerock.util.Utils.closeSilently(info.getConnection(), info.getUserDataDirContext());
+ org.forgerock.util.Utils.closeSilently(info.getConnection(), info.getUserDataConnection());
try
{
Thread.sleep(500);
@@ -208,7 +208,7 @@
}
});
info.setConnection(conn);
- info.setUserDataDirContext(null);
+ info.setUserDataConnection(null);
info.regenerateDescriptor();
return conn;
} catch (Throwable t)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewVLVIndexPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewVLVIndexPanel.java
index 9058288..bcf402f 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewVLVIndexPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewVLVIndexPanel.java
@@ -269,9 +269,9 @@
}
}
- private void createVLVIndexOnline(ConnectionWrapper ctx) throws Exception
+ private void createVLVIndexOnline(ConnectionWrapper conn) throws Exception
{
- final BackendCfgClient backend = ctx.getRootConfiguration().getBackend(backendName.getText());
+ final BackendCfgClient backend = conn.getRootConfiguration().getBackend(backendName.getText());
createBackendVLVIndexOnline((PluggableBackendCfgClient) backend);
}
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RootMonitoringPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RootMonitoringPanel.java
index 20269d1..ae6aa01 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RootMonitoringPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RootMonitoringPanel.java
@@ -27,7 +27,7 @@
import org.forgerock.opendj.ldap.responses.SearchResultEntry;
import org.opends.guitools.controlpanel.datamodel.BasicMonitoringAttributes;
import org.opends.guitools.controlpanel.datamodel.ServerDescriptor;
-import org.opends.guitools.controlpanel.util.ConfigFromDirContext;
+import org.opends.guitools.controlpanel.util.ConfigFromConnection;
import org.opends.guitools.controlpanel.util.Utilities;
import static org.opends.guitools.controlpanel.datamodel.BasicMonitoringAttributes.*;
@@ -156,8 +156,8 @@
{
String start = sr.getAttribute(START_DATE.getAttributeName()).firstValueAsString();
String current = sr.getAttribute(CURRENT_DATE.getAttributeName()).firstValueAsString();
- Date startTime = ConfigFromDirContext.utcParser.parse(start);
- Date currentTime = ConfigFromDirContext.utcParser.parse(current);
+ Date startTime = ConfigFromConnection.utcParser.parse(start);
+ Date currentTime = ConfigFromConnection.utcParser.parse(current);
long upSeconds = (currentTime.getTime() - startTime.getTime()) / 1000;
long upDays = upSeconds / 86400;
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 ead16f9..83a0f7f 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
@@ -657,7 +657,7 @@
/**
* Modifies index using the provided connection.
*
- * @param ctx
+ * @param connWrapper
* the connection to be used to update the index configuration.
* @throws Exception
* if there is an error updating the server.
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/nodes/BrowserNodeInfo.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/nodes/BrowserNodeInfo.java
index 7810925..26632c0 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/nodes/BrowserNodeInfo.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/nodes/BrowserNodeInfo.java
@@ -32,31 +32,28 @@
/**
- * Returns <CODE>true</CODE> if the displayed entry is the top entry of a
- * suffix and <CODE>false</CODE> otherwise.
- * @return <CODE>true</CODE> if the displayed entry is the top entry of a
- * suffix and <CODE>false</CODE> otherwise.
+ * Returns whether the displayed entry is the top entry of a suffix.
+ * @return {@code true} if the displayed entry is the top entry of a suffix,
+ * {@code false} otherwise.
*/
boolean isSuffix();
/**
- * Returns <CODE>true</CODE> if the displayed entry is the root node of the
- * server (the dn="" entry) and <CODE>false</CODE> otherwise.
- * @return <CODE>true</CODE> if the displayed entry is the root node of the
- * server (the dn="" entry) and <CODE>false</CODE> otherwise.
+ * Returns whether the displayed entry is the root node of the
+ * server (the dn="" entry)..
+ * @return {@code true} if the displayed entry is the root node of the
+ * server (the dn="" entry) and {@code false} otherwise.
*/
boolean isRootNode();
/**
- * Returns <CODE>true</CODE> if the displayed entry is not located on the
+ * Returns whether the displayed entry is not located on the
* current server. An entry is declared 'remote' when the host/port of
- * getURL() is different from the host/port of the DirContext associated to
- * the browser controller. Returns <CODE>false</CODE> otherwise.
- * @return <CODE>true</CODE> if the displayed entry is not located on the
- * current server. An entry is declared 'remote' when the host/port of
- * getURL() is different from the host/port of the DirContext associated to
- * the browser controller. Returns <CODE>false</CODE> otherwise.
+ * getURL() is different from the host/port of the connection associated to
+ * the browser controller.
+ * @return {@code true} if the displayed entry is not located on the
+ * current server, {@code false} otherwise.
*/
boolean isRemote();
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java
similarity index 99%
rename from opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
rename to opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java
index a38d155..8c816cc 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java
@@ -86,11 +86,8 @@
import org.opends.server.types.OpenDsException;
import org.opends.server.util.ServerConstants;
-/**
- * A class that reads the configuration and monitoring information using a
- * DirContext through LDAP.
- */
-public class ConfigFromDirContext extends ConfigReader
+/** A class that reads the configuration and monitoring information using an LDAP connection. */
+public class ConfigFromConnection extends ConfigReader
{
private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
index 160e745..c41e612 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
@@ -2119,7 +2119,7 @@
* or the provided credentials do not have enough rights.
* @throws ConfigReadException if there is an error reading the configuration.
*/
- public static ConnectionWrapper getAdminDirContext(ControlPanelInfo controlInfo, DN bindDN, String pwd)
+ public static ConnectionWrapper getAdminConnection(ControlPanelInfo controlInfo, DN bindDN, String pwd)
throws IOException, ConfigReadException
{
return createConnection(controlInfo.getAdminConnectorHostPort(), LDAPS, bindDN, pwd, controlInfo);
@@ -2138,7 +2138,7 @@
* or the provided credentials do not have enough rights.
* @throws ConfigReadException if there is an error reading the configuration.
*/
- public static ConnectionWrapper getUserDataDirContext(ControlPanelInfo controlInfo,
+ public static ConnectionWrapper getUserDataConnection(ControlPanelInfo controlInfo,
DN bindDN, String pwd) throws IOException, ConfigReadException
{
if (controlInfo.connectUsingStartTLS())
@@ -2413,7 +2413,7 @@
}
Long l = Long.parseLong(monitoringValue);
Date date = new Date(l);
- return ConfigFromDirContext.formatter.format(date);
+ return ConfigFromConnection.formatter.format(date);
}
else if (attr.isTime())
{
@@ -2427,8 +2427,8 @@
{
try
{
- Date date = ConfigFromDirContext.utcParser.parse(monitoringValue);
- return ConfigFromDirContext.formatter.format(date);
+ Date date = ConfigFromConnection.utcParser.parse(monitoringValue);
+ return ConfigFromConnection.formatter.format(date);
}
catch (Throwable t)
{
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/LoginDialog.java b/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/LoginDialog.java
index 30f9a9d..b7c2803 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/LoginDialog.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/LoginDialog.java
@@ -388,7 +388,7 @@
throw new ApplicationException(ReturnCode.APPLICATION_ERROR,
ERR_COULD_NOT_FIND_VALID_LDAPURL.get(), null);
}
- connWrapper = org.opends.guitools.controlpanel.util.Utilities.getAdminDirContext(info, dn, pwd);
+ connWrapper = org.opends.guitools.controlpanel.util.Utilities.getAdminConnection(info, dn, pwd);
return true; // server is running
}
catch (LdapException e)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
index 929496c..fcc8542 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -117,7 +117,7 @@
import org.opends.admin.ads.util.ServerLoader;
import org.opends.guitools.controlpanel.datamodel.BackendDescriptor;
import org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor;
-import org.opends.guitools.controlpanel.util.ConfigFromDirContext;
+import org.opends.guitools.controlpanel.util.ConfigFromConnection;
import org.opends.guitools.controlpanel.util.ConfigFromFile;
import org.opends.guitools.controlpanel.util.ControlPanelLog;
import org.opends.guitools.controlpanel.util.ProcessReader;
@@ -1979,7 +1979,7 @@
{
List<TaskEntry> taskEntries = new ArrayList<>();
List<Exception> exceptions = new ArrayList<>();
- ConfigFromDirContext cfg = new ConfigFromDirContext();
+ ConfigFromConnection cfg = new ConfigFromConnection();
cfg.updateTaskInformation(conn, exceptions, taskEntries);
for (Exception ode : exceptions)
{
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCli.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCli.java
index f7166e1..1f36451 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCli.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCli.java
@@ -303,7 +303,7 @@
if (managementContextOpened)
{
- try (ConnectionWrapper conn = Utilities.getAdminDirContext(controlInfo, bindDn, bindPwd))
+ try (ConnectionWrapper conn = Utilities.getAdminConnection(controlInfo, bindDn, bindPwd))
{
controlInfo.setConnection(conn);
controlInfo.regenerateDescriptor();
--
Gitblit v1.10.0