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

jvergara
18.15.2007 1d5f9c9484a47d91ab2c4cf3796e5b1effca89ec
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -63,6 +63,8 @@
 */
public class Utils
{
  private static final int DEFAULT_LDAP_CONNECT_TIMEOUT = 3000;
  private static final int BUFFER_SIZE = 1024;
  private static final int MAX_LINE_WIDTH = 80;
@@ -269,6 +271,15 @@
  }
  /**
   * Returns a String representation of the OS we are running.
   * @return a String representation of the OS we are running.
   */
  public static String getOSString()
  {
    return SetupUtils.getOSString();
  }
  /**
   * Returns <CODE>true</CODE> if the parent directory for the provided path
   * exists and <CODE>false</CODE> otherwise.
   * @param path the path that we are analyzing.
@@ -855,7 +866,8 @@
    try
    {
      InitialLdapContext ctx =
        Utils.createLdapContext(ldapUrl, dn, pwd, 3000, null);
        Utils.createLdapContext(ldapUrl, dn, pwd,
            Utils.getDefaultLDAPTimeout(), null);
      /*
       * Search for the config to check that it is the directory manager.
@@ -950,13 +962,13 @@
   * Displays an error message dialog.
   *
   * @param parent
   *          the parent frame of the error dialog.
   *          the parent component of the error dialog.
   * @param msg
   *          the error message.
   * @param title
   *          the title for the dialog.
   */
  public static void displayError(JFrame parent, String msg, String title)
  public static void displayError(Component parent, String msg, String title)
  {
    JOptionPane.showMessageDialog(parent, msg, title,
        JOptionPane.ERROR_MESSAGE);
@@ -1107,6 +1119,17 @@
  }
  /**
   * Returns the default LDAP timeout in milliseconds when we try to connect to
   * a server.
   * @return the default LDAP timeout in milliseconds when we try to connect to
   * a server.
   */
  public static int getDefaultLDAPTimeout()
  {
    return DEFAULT_LDAP_CONNECT_TIMEOUT;
  }
  /**
   * Returns the max size in character of a line to be displayed in the command
   * line.
   * @return the max size in character of a line to be displayed in the command