mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
08.52.2007 5df428542b76a97c8277a0f3b08f9c3b86549a99
Add missing files to my previous commit:

The following modifications have the following goals:

1. Provide a fix for the GUI part of issue 1894 (consider replication in uninstall). Basically the graphical uninstall checks whether there is an ADS defined and if the server is configured for replication and asks the users whether (s)he wants to remove the references to the server that is being uninstalled.

2. Fix some minor issues that appear in the merged version of the installer and upgrader.

3. Update the build so that statuspanel.jar disappears. The idea is to minimize the number of jars that we have. This is a requirement coming from customers and approved by Neil in a conversation we had a while ago.

4. Minimize the number of classes that go to quicksetup.jar so that its size is the minimal possible and we reduce the download time when launching the WebStart based tools. This has been done by moving the uninstaller tool to OpenDS.jar (with the status tools).



2 files added
545 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/i18n/ResourceProvider.java 193 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/resources/Resources.properties 352 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/i18n/ResourceProvider.java
New file
@@ -0,0 +1,193 @@
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License, Version 1.0 only
 * (the "License").  You may not use this file except in compliance
 * with the License.
 *
 * You can obtain a copy of the license at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 * add the following below this CDDL HEADER, with the fields enclosed
 * by brackets "[]" replaced with your own identifying information:
 *      Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2007 Sun Microsystems, Inc.
 */
package org.opends.guitools.i18n;
import java.text.MessageFormat;
import java.util.ResourceBundle;
/**
 * This class is used to retrieve localized messages from Resources.properties
 * files.  This class extends org.opends.quicksetup.i18n.ResourceProvider so
 * that it first looks for properties in the Resources.properties located in
 * the org.opends.quicksetup.resources package and then if they are not there
 * looks for properties in org.opends.guitools.resources.
 *
 * This is done to avoid duplication of properties between the setup and
 * upgrader which must be separated because of their Web Start nature and the
 * other graphical tools.
 *
 */
public class ResourceProvider
extends org.opends.quicksetup.i18n.ResourceProvider
{
  private ResourceBundle bundle;
  private static ResourceProvider instance;
  private static final String BUNDLE_NAME =
    "org.opends.guitools.resources.Resources";
  private ResourceProvider()
  {
  }
  /**
   * Provides an instance of the ResourceProvider.  The instance is unique for
   * this process (which implies that during the process lifetime we can only
   * have messages in one language).
   *
   * @return an instance of ResourceProvider.
   */
  public static ResourceProvider getInstance()
  {
    if (instance == null)
    {
      instance = new ResourceProvider();
    }
    return instance;
  }
  /**
   * Gets a localized message for a key value.  In  the properties file we have
   * something of type:
   * key=value
   * @param key the key in the properties file.
   * @return the value associated to the key in the properties file.
   * @throws IllegalArgumentException if the key could not be found in the
   * properties file.
   */
  public String getMsg(String key) throws IllegalArgumentException
  {
    String msg;
    try
    {
      /* First try to quick setup resource provider as it contains most of
       * the labels.
       */
      msg = super.getMsg(key);
    }
    catch (Exception ex)
    {
      /* Now try with the status panel specific resources.
       */
      try
      {
        msg = getResourceBundle().getString(key);
      } catch (java.util.MissingResourceException e)
      {
        // The less brutal alternative here is to do msg = key instead
        // of
        // throwing an exception but this helps being strict with
        // resources
        // (so I prefer to keep it as it is at least at the beginning)
        throw new IllegalArgumentException("Unknown Resource Bundle key: " +
            key);
      }
    }
    return msg;
  }
  /**
   * Gets a localized message for a key value.  In  the properties file we have
   * something of type:
   * key=value
   *
   * For instance if we pass as key "mykey" and as arguments {"value1"} and
   * in the properties file we have:
   * mykey=value with argument {0}.
   *
   * This method will return "value with argument value1".
   *
   * @param key the key in the properties file.
   * @param args the arguments to be passed to generate the resulting value.
   * @return the value associated to the key in the properties file.
   * @throws IllegalArgumentException if the key could not be found in the
   * properties file.
   */
  public String getMsg(String key, String... args)
  throws IllegalArgumentException
  {
    String msg;
    try
    {
      /* First try to quick setup resource provider as it contains most of
       * the labels.
       */
      msg = super.getMsg(key, args);
    }
    catch (Exception ex)
    {
      /* Now try with the status panel specific resources.
       */
      try
      {
        String pattern = getResourceBundle().getString(key);
        MessageFormat mf = new MessageFormat(pattern);
        msg = mf.format(args);
      } catch (java.util.MissingResourceException e)
      {
        // The less brutal alternative here is to do msg = key instead
        // of
        // throwing an exception but this helps being strict with
        // resources
        // (so I prefer to keep it as it is at least at the beginning)
        throw new IllegalArgumentException("Unknown Resource Bundle key: " +
            key);
      }
    }
    return msg;
  }
  /**
   * The ResourceBundle that will be used to get the localized messages.
   * @return the ResourceBundle that will be used to get the localized
   * messages.
   */
  private ResourceBundle getResourceBundle()
  {
    if (bundle == null)
    {
      try
      {
        bundle =
          ResourceBundle.getBundle(BUNDLE_NAME, getLocale(), this
              .getClass().getClassLoader());
      } catch (java.util.MissingResourceException e)
      {
        throw new IllegalStateException("Could not retrieve Resource Bundle: "
            + BUNDLE_NAME, e);
      }
    }
    return bundle;
  }
}
opends/src/guitools/org/opends/guitools/resources/Resources.properties
New file
@@ -0,0 +1,352 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#      Portions Copyright 2006-2007 Sun Microsystems, Inc.
#
#
# This file contains the primary Directory Server configuration.  It must not
# be directly edited while the server is online.  The server configuration
# should only be managed using the administration utilities provided with the
# Directory Server.
#
# StatusPanel launcher
#
status-panel-launcher-usage-description=This utility may be used to display \
the Status Panel window which displays basic server information and allows to \
start, stop and restart the server.
status-panel-launcher-gui-launch-failed=Could not launch Status Panel.  Check \
that you have access to the display.
status-panel-launcher-gui-launch-failed-details=Could not launch Status \
Panel.  Check that you have access to the display.   Check file {0} for details.
#
# StatusPanel
#
statuspanel-dialog-title=OpenDS Status Panel
quit-status-panel-button-tooltip=Quit Status Panel
server-status-title=Server Status
server-status-label=Server Run Status:
not-available-server-down-tooltip=<html>Information is only available if \
server is running and you are authenticated<br>as an administrative user.
not-available-authentication-required-tooltip=<html>Information is only \
available if you are authenticated<br>as an administrative user.
stop-button-label=Stop
stop-button-tooltip=Stops the Directory Server
start-button-label=Start
start-button-tooltip=Starts the Directory Server
restart-button-label=Restart
restart-button-tooltip=Restarts the Directory Server
connections-label=Open Connections:
server-details-title=Server Details
administrative-users-label=Administrative Users:
installation-path-label=Installation Path:
opends-version-label=OpenDS Version:
java-version-label=Java Version:
login-dialog-title=Authentication Required
server-started-label=Started
server-stopped-label=Stopped
server-starting-label=Starting
server-stopping-label=Stopping
server-unknown-status-label=Unknown
cannot-connect-to-login-with-cause=Could not connect to the Directory \
Server with the provided credentials.  The possible causes for this are:\n{0}
cannot-connect-to-login-without-cause=Could not connect to the Directory \
Server with the provided credentials.\nCheck that the Administrative User DN \
and password are valid.
error-starting-server-generic=Could not Start server.
authenticate-button-label=Authenticate
authenticate-status-panel-button-tooltip=Authenticate as an administrative \
user to view all monitoring information
listeners-title=Listener Ports
address-port-column=Address:Port
protocol-column=Protocol
state-column=State
databases-title=Data Sources
backendid-column=Backend ID
basedn-column=Base DN
number-entries-column=Entries
replicated-column=Replication
missing-changes-column=Missing Changes
age-of-oldest-missing-change-column=<html>Age of Oldest<br>Missing \
Change<br>(hh:mm:ss)
age-of-oldest-missing-change-column-cli=Age of Oldest Missing Change (hh:mm:ss)
enabled-label=Enabled
disabled-label=Disabled
unknown-label=--
not-applicable-label=--
ldap-protocol-label=LDAP
ldaps-protocol-label=LDAPS
jmx-protocol-label=JMX
jmx-secure-protocol-label=JMX (Secure)
undefined-protocol-label=-Unknown-
error-reading-config-file=Error reading the configuration file.
could-not-find-valid-ldapurl=Error reading the configuration file.\n\
This could be caused because there is not an enabled LDAP port for the \
specified connection parameters or because you do not have read rights on the \
configuration file.
number-entries-multiple-suffixes-in-db={0} (for all base DNs in {1})
error-reading-config-ldap=Error reading data from server.  Verify the \
authentication information provided.\nDetails: {0}
no-dbs-found=-No LDAP Databases Found-
no-listeners-found=-No Listener Ports Found-
suffix-replicated-label=Enabled
suffix-not-replicated-label=Disabled
#
# Confirmation messages
#
confirm-stop-message=Are you sure you want to Stop the Directory Server?
confirm-stop-title=Confirmation Required
confirm-restart-message=Are you sure you want to Restart the Directory Server?
confirm-restart-title=Confirmation Required
#
# Status Login Dialog
#
login-dialog-msg=You must provide an Administrative User DN and password \
to retrieve monitoring information.
login-dn-label=Administrative User DN:
login-dn-tooltip=Enter the distinguished name (DN) of the \
Administrative User account that will used to retrieve monitoring information
login-pwd-label=Administrative User Password:
login-pwd-tooltip=Enter the password of the \
Administrative User account that will used to retrieve monitoring information
login-dialog-server-not-running-msg=The Directory Server is not running.  \
Click OK to continue to the Status Panel.
login-dialog-server-not-running-title=Directory Server not Running
login-ok-button-tooltip=Proceed with authentication
login-cancel-button-tooltip=Close Login Dialog
cannot-connect-with-ads-credentials-without-cause=Could not connect to the \
Directory Server with the provided credentials.\nCheck that the Administrative \
User ID and password are valid.
#
# Status Command Line
#
cli-status-pwd-and-pwd-file-provided=You cannot provide Bind Password (-w or \
--bindPassword) and Bind Password File (-W or --bindPasswordFile) at the same \
time.
cli-status-error-reading-pwd-file=Could not read the password from \
file {0}.  Check that the file path is correct, that you have access rights to \
it and that it contains a password.
cli-status-ldapauth-password-prompt=Password for user {0}:
status-cli-usage-description=This utility may be used to display basic server \
information
not-available-authentication-required-cli-label=<not available> (*)
not-available-authentication-required-cli-legend=* Information only available \
if you provide authentication information when launching the status \
command.
not-available-server-down-cli-label=<not available> (*)
not-available-server-down-cli-legend=* Information only available if server is \
running and you provide authentication information when launching the status \
command.
#
# Uninstall command line messages
#
uninstall-launcher-usage-description=This utility may be used to uninstall the \
Directory Server.
uninstall-launcher-launching-gui=Launching graphical uninstall...
uninstall-launcher-launching-cli=Launching command line uninstall...
uninstall-launcher-gui-launched-failed=\n\nThe graphical Uninstall launch \
failed.\n\nLaunching command line Uninstall...
uninstall-launcher-gui-launched-failed-details=\n\nThe graphical Uninstall \
launch failed.  Check file {0} for more details.\n\nLaunching command line \
Uninstall...
cli-uninstall-unknown-argument=Unknown argument {0}
cli-uninstall-yes-short=y
cli-uninstall-yes-long=yes
cli-uninstall-no-short=n
cli-uninstall-no-long=no
cli-uninstall-confirm-prompt={0}\n[{1}]:
cli-uninstall-string-prompt={0}\n[{1}]:
cli-uninstall-error-reading-stdin=Unexpected error reading standard input.
cli-uninstall-what-to-delete=Do you want to remove all components of \
OpenDS or select the components to remove?\n\
1. Remove all components\n\
2. Select the components to be removed\n\
3. Neither; Quit the uninstaller
cli-uninstall-confirm-libraries-binaries=Remove Server Libraries and \
Administrative Tools?
cli-uninstall-confirm-databases=Remove Database Contents?
cli-uninstall-confirm-logs=Remove Log Files?
cli-uninstall-confirm-configuration-schema=Remove Configuration and Schema \
Files?
cli-uninstall-confirm-backups=Remove Backup Files Contained in bak Directory?
cli-uninstall-confirm-ldifs=Remove LDIF Export Files Contained in ldif \
Directory?
cli-uninstall-confirm-outsidedbs=The Directory Server contains database files \
in the following locations outside the server path:\n{0}\nRemove these files?
cli-uninstall-confirm-outsidelogs=The Directory Server contains log files in \
the following locations outside the server path:\n{0}\nRemove these files?
cli-uninstall-nothing-to-be-uninstalled=You must select something to be \
uninstalled.
cli-uninstall-confirm-stop=The OpenDS server is currently running and \
must be stopped before uninstallation can continue.\nStop the Server and \
permanently delete the files?
cli-uninstall-confirm-delete-files=The files will be permanently deleted, are \
you sure you want to continue?
cli-uninstall-server-stopped=The Server is Stopped.
#
# Dialog titles
#
frame-uninstall-title=OpenDS Uninstall
#
# Wizard buttons (labels and tooltips)
#
finish-button-uninstall-label=Uninstall
finish-button-uninstall-tooltip=Finish Uninstall
close-button-uninstall-tooltip=Close Uninstall Window
#
# Confirmation dialogs
#
confirm-close-uninstall-title=Confirmation Required
confirm-close-uninstall-msg=OpenDS Uninstall has not yet completed.\nAre you \
sure you want to close the Uninstall Window?
cancel-button-uninstall-tooltip=Cancel Uninstall
confirm-uninstall-server-not-running-msg=Confirm Uninstall\n\
All selected files will be permanently deleted, are you sure you \
want to continue?
confirm-uninstall-server-not-running-title=Confirm Uninstall
confirm-uninstall-server-running-msg=Server is Running\n\
The OpenDS server is currently running and must be stopped before \
uninstallation can continue. Do you want the uninstaller to stop \
the server for you and continue with the uninstall? If you click \
No, you will need to stop the server manually to continue.
confirm-uninstall-replication-server-running-title=Confirmation Required
confirm-uninstall-replication-server-running-msg=This server is configured to \
do replication.\nIn order to remove references to this server in other \
OpenDS servers you must provide administrator authentication.\n\nClick on \
'Yes' to provide authentication to remove the remote references.
confirm-uninstall-replication-server-not-running-title=Confirmation Required
confirm-uninstall-replication-server-not-running-msg=This server is configured \
to do replication.\nIn order to remove references to this server in other \
OpenDS servers the server will be started and then you must provide \
administrator authentication.\n\nClick on 'Yes' to start the server and then \
provide authentication to remove the remote references.
confirm-uninstall-server-running-title=Server is Running
# Confirm Uninstall Panel
nothing-selected-to-uninstall=You must select something to be uninstalled.
#
# Steps labels (on the left side of the wizard)
#
confirm-uninstall-step=Uninstall Options
#
# Confirm Uninstall Panel specific labels
#
confirm-uninstall-panel-title=Uninstall Options
# The following line contains some HTML tags.  translators should respect them.
# Concerning the URL, depending on how works the product page translators
# have to modify it or not: if the server uses the locale of the browser to display
# a language there is no translation to be done but if we have specific URL for
# each language the URL must be localized.
confirm-uninstall-panel-instructions=The OpenDS Uninstall tool will remove all \
parts of the OpenDS server you have selected below from your system. If all \
are selected, the server will be removed entirely.
server-path-label=Server Path:
remove-label=Remove:
remove-libraries-and-tools-label=Server Libraries and Administrative Tools
remove-databases-label=Database Contents
remove-logs-label=Log Files
remove-schema-and-configuration-label=Configuration and Schema Files
remove-backups-label=Backup Files Contained in bak Directory
remove-ldifs-label=LDIF Export Files Contained in ldif Directory
remove-libraries-and-tools-tooltip=Remove Server Libraries and Administrative \
Tools
remove-databases-tooltip=Remove Database Contents
remove-logs-tooltip=Remove Log Files
remove-schema-and-configuration-tooltip=Remove Configuration and Schema Files
remove-backups-tooltip=Remove Backup Files Contained in bak Directory
remove-ldifs-tooltip=Remove LDIF Export Files Contained in ldif Directory
delete-outside-dbs-msg=The Directory Server contains database files in the \
following locations outside the server path:
delete-outside-dbs-label=Delete these Database Files
delete-outside-dbs-tooltip=Check this box to Delete the Database Files located \
outside the install directory
delete-outside-logs-msg=The Directory Server contains log files in the \
following locations outside the server path:
delete-outside-logs-label=Delete these Log Files
delete-outside-logs-tooltip=Check this box to Delete the Log Files located \
outside the install directory
#
# Progress Summary Labels
#
summary-uninstall-not-started=Starting Uninstallation...
summary-disabling-windows-service=Disabling Windows Service...
summary-deleting-external-db-files=Deleting Database Files outside the \
Installation Path...
summary-deleting-external-log-files=Deleting Log Files outside the \
Installation Path...
summary-deleting-external-references=Deleting External References...
summary-deleting-installation-files=Deleting Files under the Installation \
Path...
summary-unconfiguring-replication=Removing references in remote OpenDS \
servers...
summary-uninstall-finished-successfully-remove-jarfiles=<b>OpenDS Uninstall \
Completed Successfully.</b><br><br>To complete the uninstallation, you must \
delete manually the following files and directories:<br>{0}
summary-uninstall-finished-successfully=<b>OpenDS Uninstall Completed \
Successfully.</b>
summary-uninstall-finished-successfully-remove-jarfiles-cli=OpenDS Uninstall \
Completed Successfully.\nTo complete the uninstallation, you must \
delete manually the following files and directories:\n{0}
summary-uninstall-finished-successfully-cli=OpenDS Uninstall Completed \
Successfully.
summary-uninstall-finished-with-error=An error occurred.  Check 'Details' text \
area for more information.
summary-uninstall-finished-with-error-on-remote=<b>OpenDS Uninstall Succeeded \
With Warnings</b><br>OpenDS was successfully uninstalled in the local \
machine but some error occurred updating remote servers.  Check 'Details' text \
area for more information.
summary-uninstall-finished-with-error-on-remote-cli=OpenDS was successfully \
uninstalled in the local machine but some error occurred updating remote \
servers.
progress-removing-references=Removing references on {0}
#
# Uninstall login dialog
#
uninstall-login-dialog-msg=You must provide a Global Administrative User ID to \
be able to remove the references to this server in other OpenDS servers.\nYou \
must also provide the name of this host (or IP address) as it is referenced in \
remote servers.
uninstall-login-host-name-label=Host Name:
uninstall-login-host-name-tooltip=The name of this host (or IP address) as it \
is referenced in other OpenDS servers.
uninstall-login-uid-tooltip=The Global Administrator User ID to be used to \
read and update configuration in other OpenDS servers.
uninstall-login-pwd-tooltip=The password of the Global Administrator to be \
used to read and update configuration in other OpenDS servers.
uninstall-login-ok-button-tooltip=Try to connect with the provided \
authentication.
uninstall-login-cancel-button-tooltip=Close this dialog and do not try to \
remove references of this server in other OpenDS servers.