From 7b882d3300019e3fa8d850bbd44ffc3aac68dc2d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 19 Jul 2007 20:16:22 +0000
Subject: [PATCH] Use consistently the terminology "Base DN" instead of suffix in the graphical tools.
---
opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties | 51 +++++++++--------
opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java | 6 +
opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java | 21 +++++++
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java | 21 +++++++
opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java | 31 ++++++++++
5 files changed, 103 insertions(+), 27 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java b/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
index d0b9333..b8dc41b 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -1462,7 +1462,9 @@
Installation installation = getInstallation();
String cmd = Utils.getPath(installation.getStatusPanelCommandFile());
cmd = UIFactory.applyFontToHtml(cmd, UIFactory.INSTRUCTIONS_MONOSPACE_FONT);
- String[] args = {formatter.getFormattedText(getInstallationPath()), cmd};
+ String[] args = {formatter.getFormattedText(getInstallationPath()),
+ getMsg("general-server-stopped"),
+ cmd};
hmSummary.put(InstallProgressStep.FINISHED_SUCCESSFULLY,
getFormattedSuccess(
getMsg("summary-install-finished-successfully", args)));
@@ -1474,6 +1476,33 @@
}
/**
+ * Updates the messages in the summary with the state of the server.
+ * @param hmSummary the Map containing the messages.
+ */
+ protected void updateSummaryWithServerState(
+ Map<InstallProgressStep, String> hmSummary)
+ {
+ Installation installation = getInstallation();
+ String cmd = Utils.getPath(installation.getStatusPanelCommandFile());
+ cmd = UIFactory.applyFontToHtml(cmd, UIFactory.INSTRUCTIONS_MONOSPACE_FONT);
+ String status;
+ if (installation.getStatus().isServerRunning())
+ {
+ status = getMsg("general-server-started");
+ }
+ else
+ {
+ status = getMsg("general-server-stopped");
+ }
+ String[] args = {formatter.getFormattedText(getInstallationPath()), status,
+ cmd};
+ hmSummary.put(InstallProgressStep.FINISHED_SUCCESSFULLY,
+ getFormattedSuccess(
+ getMsg("summary-install-finished-successfully", args)));
+ hmSummary.put(InstallProgressStep.FINISHED_WITH_ERROR,
+ getFormattedError(getMsg("summary-install-finished-with-error", args)));
+ }
+ /**
* Checks the value of <code>canceled</code> field and throws an
* ApplicationException if true. This indicates that the user has
* canceled this operation and the process of aborting should begin
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
index 9338a42..b9de6dc 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
@@ -396,9 +396,11 @@
usedServerIds.add(domain.getServerId());
domain.commit();
- servers.removeAll(oldServers);
+ Set<String> addedServers = new TreeSet<String>();
+ addedServers.addAll(servers);
+ addedServers.removeAll(oldServers);
ConfiguredDomain domainConf = new ConfiguredDomain(domainName,
- isCreated, servers);
+ isCreated, addedServers);
domainsConf.add(domainConf);
}
return new ConfiguredReplication(synchProviderCreated,
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java b/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
index 61973d7..6ed5ca0 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
@@ -152,6 +152,7 @@
}
checkAbort();
+ updateSummaryWithServerState(hmSummary);
setCurrentProgressStep(InstallProgressStep.FINISHED_SUCCESSFULLY);
notifyListeners(null);
@@ -162,8 +163,18 @@
setCurrentProgressStep(InstallProgressStep.FINISHED_CANCELED);
notifyListeners(null);
} else {
+ // Stop the server if necessary
+ Installation installation = getInstallation();
+ if (installation.getStatus().isServerRunning()) {
+ try {
+ new ServerController(installation).stopServer(true);
+ } catch (Throwable t) {
+ LOG.log(Level.INFO, "error stopping server", t);
+ }
+ }
notifyListeners(getLineBreak());
notifyListenersOfLog();
+ updateSummaryWithServerState(hmSummary);
setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR);
String html = getFormattedError(ex, true);
notifyListeners(html);
@@ -172,8 +183,18 @@
}
catch (Throwable t)
{
+ // Stop the server if necessary
+ Installation installation = getInstallation();
+ if (installation.getStatus().isServerRunning()) {
+ try {
+ new ServerController(installation).stopServer(true);
+ } catch (Throwable t2) {
+ LOG.log(Level.INFO, "error stopping server", t2);
+ }
+ }
notifyListeners(getLineBreak());
notifyListenersOfLog();
+ updateSummaryWithServerState(hmSummary);
setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR);
ApplicationException ex = new ApplicationException(
ApplicationException.Type.BUG, getThrowableMsg("bug-msg", t), t);
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
index af599fe..35b7b81 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
@@ -209,6 +209,7 @@
}
checkAbort();
+ updateSummaryWithServerState(hmSummary);
setCurrentProgressStep(InstallProgressStep.FINISHED_SUCCESSFULLY);
notifyListeners(null);
@@ -219,8 +220,18 @@
setCurrentProgressStep(InstallProgressStep.FINISHED_CANCELED);
notifyListeners(null);
} else {
+ // Stop the server if necessary
+ Installation installation = getInstallation();
+ if (installation.getStatus().isServerRunning()) {
+ try {
+ new ServerController(installation).stopServer(true);
+ } catch (Throwable t) {
+ LOG.log(Level.INFO, "error stopping server", t);
+ }
+ }
notifyListeners(getLineBreak());
notifyListenersOfLog();
+ updateSummaryWithServerState(hmSummary);
setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR);
String html = getFormattedError(ex, true);
notifyListeners(html);
@@ -229,8 +240,18 @@
}
catch (Throwable t)
{
+ // Stop the server if necessary
+ Installation installation = getInstallation();
+ if (installation.getStatus().isServerRunning()) {
+ try {
+ new ServerController(installation).stopServer(true);
+ } catch (Throwable t2) {
+ LOG.log(Level.INFO, "error stopping server", t2);
+ }
+ }
notifyListeners(getLineBreak());
notifyListenersOfLog();
+ updateSummaryWithServerState(hmSummary);
setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR);
ApplicationException ex = new ApplicationException(
ApplicationException.Type.BUG, getThrowableMsg("bug-msg", t), t);
diff --git a/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties b/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
index 9139fe0..54cd439 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
+++ b/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
@@ -299,7 +299,7 @@
registration information in {0}.\nThe error is: {1}
ads-exception=An unexpected error occurred managing the registration \
information.\nThe error is: {0}
-no-suffixes-chosen-to-replicate=You must select at least one suffix to \
+no-suffixes-chosen-to-replicate=You must select at least one base DN to \
replicate contents with.
# Create Global Administrator Panel
empty-administrator-uid=You must provide a Global Administrative User ID.
@@ -531,7 +531,7 @@
remote-server-port-label=Port:
remote-server-port-tooltip=The LDAP port of the OpenDS you want to \
replicate data with.
-remote-server-port-is-secure-label=Secure Port
+remote-server-port-is-secure-label=This is a Secure Port
remote-server-port-is-secure-tooltip=Check this is the provided port is the \
LDAPS port.
standalone-server-label=This will be a standalone server
@@ -624,23 +624,23 @@
#
# Suffixes to Replicate Panel specific labels
#
-suffixes-to-replicate-panel-instructions=Choose whether to create suffixes \
-as defined on remote servers or to create a new suffix.
+suffixes-to-replicate-panel-instructions=Choose whether to create base DNs \
+as defined on remote servers or to create a new base DN.
suffixes-to-replicate-panel-title=Data Replication
-create-new-suffix-label=Create first instance of suffix to be replicated
-create-new-suffix-tooltip=Check this to create a new suffix.
-replicate-with-suffixes-label=Create local instance of existing suffixes and \
+create-new-suffix-label=Create first instance of base DN to be replicated
+create-new-suffix-tooltip=Check this to create a new base DN.
+replicate-with-suffixes-label=Create local instance of existing base DNs and \
configure replication:
-replicate-with-suffixes-tooltip=Check this to Create Suffixes whose \
-Contents are replicated with Existing Suffixes.
-suffixes-to-replicate-dn-tooltip=The Distinguished Name (DN) of the suffix \
+replicate-with-suffixes-tooltip=Check this to Create Base DNs whose \
+Contents are replicated with Existing Base DNs.
+suffixes-to-replicate-dn-tooltip=The Distinguished Name (DN) of the base DN \
to replicate.
suffix-list-replica-display-entries={0} ({1} entries)
suffix-list-replica-display-no-entries={0} (no entries)
suffix-list-replica-display-entries-not-available={0} (number of entries not \
available)
suffix-list-unknown-label=<unknown>
-suffix-list-empty=-No Suffixes Found-
+suffix-list-empty=-No Base DNs Found-
#
# Security Options dialog specific labels
@@ -728,13 +728,13 @@
leave-database-empty-tooltip=Do not create any entry for the Directory Base DN
import-data-from-ldif-label=Import Data from LDIF File
import-data-from-ldif-tooltip=Use the contents of an LDIF file to populate the \
-suffix with data
+base DN with data
import-path-label=Path:
import-path-tooltip=Enter the full path of the LDIF file containing the \
data to be imported
import-automatically-generated-label=Import Automatically-Generated Example \
Data
-import-automatically-generated-tooltip=Populate the suffix with \
+import-automatically-generated-tooltip=Populate the base DN with \
automatically-generated LDAP data
number-entries-label=Number of User Entries:
number-entries-tooltip=Enter the number of user entries to be generated
@@ -750,8 +750,8 @@
review-import-ldif=Import Data from LDIF File ({0})
review-import-automatically-generated=Import Automatically-Generated Data ({0} \
Entries)
-review-create-suffix=Create New Suffix {0}.\nSuffix Data: {1}
-review-replicate-suffix=Replicate contents with suffixes:\n{0}
+review-create-suffix=Create New Base DN {0}.\Base DN Data: {1}
+review-replicate-suffix=Replicate contents with base DNs:\n{0}
start-server-label=Start Server when Configuration has Completed
start-server-tooltip=Check this check box if you want to start the server once \
the installation and configuration has completed
@@ -847,21 +847,23 @@
summary-canceling=Canceling...
summary-configuring-ads=Creating Registration Configuration...
summary-initialize-replicated-suffixes=Initializing Contents of Replicated \
-Suffixes...
+Base DNs...
summary-install-finished-successfully=<b>OpenDS QuickSetup Completed \
-Successfully.</b><br>OpenDS is now installed in {0}.<br><br>Visit the \
-<a href="https://www.opends.org/wiki/page/QuickReferenceGuide"> \
+Successfully.</b><br>OpenDS is now installed in {0}.<br>The server is {1}.<br>\
+<br>Visit the <a href="https://www.opends.org/wiki/page/QuickReferenceGuide"> \
OpenDS Quick Reference</a> page for an overview of server management and \
configuration.<br>To see basic server configuration status and to start/stop \
the server, click Launch Status Panel. Note that you can launch this tool \
-later using {1}.<br><INPUT type="submit" value="Launch Status Panel"></INPUT>
+later using {2}.<br><INPUT type="submit" value="Launch Status Panel"></INPUT>
summary-install-finished-canceled=<b>OpenDS QuickSetup Canceled.</b> \
<br>The upgrade operation was canceled and any files installed to your system \
during this operation have been removed.
summary-install-finished-with-error=An error occurred. Check 'Details' text \
-area for more information.<br>To see basic server configuration status, click \
+area for more information.<br>The server is {1}.<br>To see basic server \
+configuration status, click \
Launch Status Panel. Note that you can launch this tool \
-later using {1}.<br><INPUT type="submit" value="Launch Status Panel"></INPUT>
+later using {2}.<br><INPUT type="submit" value="Launch Status Panel"></INPUT>
+
summary-stopping=Stopping Directory Server...
summary-disabling-windows-service=Disabling Windows Service...
summary-deleting-external-db-files=Deleting Database Files outside the \
@@ -982,9 +984,9 @@
progress-creating-ads-on-remote=Creating Registration Configuration on {0}
progress-unconfiguring-ads-on-remote=Reverting Registration Configuration on {0}
progress-initializing-ads=Initializing Registration information
-progress-initializing-suffix=Initializing suffix {0} with the contents from \
+progress-initializing-suffix=Initializing base DN {0} with the contents from \
{1}:
-suffix-initialized-successfully=Suffix initialized successfully.
+suffix-initialized-successfully=Base DN initialized successfully.
global-administrator-description=The Administrator that can manage all the \
OpenDS instances.
@@ -1291,4 +1293,5 @@
general-unset=Unset
general-none=None
general-unspecified=Unspecified
-
+general-server-started=started
+general-server-stopped=stopped
--
Gitblit v1.10.0