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

jvergara
21.50.2007 aed142d4d844c03c001a46e39f3e0f7ddc4f46ce
opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/Uninstaller.java
@@ -759,15 +759,24 @@
      if (getUserData().getStopServer()) {
        status = UninstallProgressStep.STOPPING_SERVER;
        if (displaySeparator) {
        if (displaySeparator && isVerbose()) {
          notifyListeners(getTaskSeparator());
        }
        new ServerController(this).stopServer();
        if (!isVerbose())
        {
          notifyListeners(getFormattedWithPoints(
              INFO_PROGRESS_STOPPING_NON_VERBOSE.get()));
        }
        new ServerController(this).stopServer(!isVerbose());
        if (!isVerbose())
        {
          notifyListeners(getFormattedDoneWithLineBreak());
        }
        displaySeparator = true;
      }
      if (isWindowsServiceEnabled()) {
        status = UninstallProgressStep.DISABLING_WINDOWS_SERVICE;
        if (displaySeparator) {
        if (displaySeparator && isVerbose()) {
          notifyListeners(getTaskSeparator());
        }
        disableWindowsService();
@@ -777,7 +786,7 @@
      Set<String> dbsToDelete = getUninstallUserData().getExternalDbsToRemove();
      if (dbsToDelete.size() > 0) {
        status = UninstallProgressStep.DELETING_EXTERNAL_DATABASE_FILES;
        if (displaySeparator) {
        if (displaySeparator && isVerbose()) {
          notifyListeners(getTaskSeparator());
        }
@@ -790,7 +799,7 @@
      if (logsToDelete.size() > 0) {
        status = UninstallProgressStep.DELETING_EXTERNAL_LOG_FILES;
        if (displaySeparator) {
        if (displaySeparator && isVerbose()) {
          notifyListeners(getTaskSeparator());
        }
@@ -805,7 +814,7 @@
              userData.getRemoveLDIFs() ||
              userData.getRemoveLibrariesAndTools() ||
              userData.getRemoveLogs();
      if (displaySeparator && somethingToDelete) {
      if (displaySeparator && somethingToDelete && isVerbose()) {
        notifyListeners(getTaskSeparator());
      }
@@ -964,11 +973,23 @@
   */
  private void deleteExternalDatabaseFiles(Set<String> dbFiles)
          throws ApplicationException {
    notifyListeners(getFormattedProgressWithLineBreak(
    if (isVerbose())
    {
      notifyListeners(getFormattedProgressWithLineBreak(
            INFO_PROGRESS_DELETING_EXTERNAL_DB_FILES.get()));
    }
    else
    {
      notifyListeners(getFormattedWithPoints(
          INFO_PROGRESS_DELETING_EXTERNAL_DB_FILES_NON_VERBOSE.get()));
    }
    for (String path : dbFiles) {
      deleteRecursively(new File(path));
    }
    if (!isVerbose())
    {
      notifyListeners(getFormattedDone());
    }
  }
  /**
@@ -979,11 +1000,23 @@
   */
  private void deleteExternalLogFiles(Set<String> logFiles)
          throws ApplicationException {
    notifyListeners(getFormattedProgressWithLineBreak(
            INFO_PROGRESS_DELETING_EXTERNAL_LOG_FILES.get()));
    if (isVerbose())
    {
      notifyListeners(getFormattedProgressWithLineBreak(
          INFO_PROGRESS_DELETING_EXTERNAL_LOG_FILES.get()));
    }
    else
    {
      notifyListeners(getFormattedWithPoints(
          INFO_PROGRESS_DELETING_EXTERNAL_LOG_FILES_NON_VERBOSE.get()));
    }
    for (String path : logFiles) {
      deleteRecursively(new File(path));
    }
    if (!isVerbose())
    {
      notifyListeners(getFormattedDone());
    }
  }
  /**
@@ -993,8 +1026,16 @@
   */
  private void deleteInstallationFiles(int minRatio, int maxRatio)
          throws ApplicationException {
    notifyListeners(getFormattedProgressWithLineBreak(
            INFO_PROGRESS_DELETING_INSTALLATION_FILES.get()));
    if (isVerbose())
    {
      notifyListeners(getFormattedProgressWithLineBreak(
          INFO_PROGRESS_DELETING_INSTALLATION_FILES.get()));
    }
    else
    {
      notifyListeners(getFormattedWithPoints(
          INFO_PROGRESS_DELETING_INSTALLATION_FILES_NON_VERBOSE.get()));
    }
    File f = new File(getInstallPathFromClasspath());
    InstallationFilesToDeleteFilter filter =
            new InstallationFilesToDeleteFilter();
@@ -1054,6 +1095,10 @@
      }
      hmRatio.put(UninstallProgressStep.DELETING_INSTALLATION_FILES, maxRatio);
    }
    if (!isVerbose())
    {
      notifyListeners(getFormattedDone());
    }
  }
  /**
@@ -1116,12 +1161,15 @@
  private void delete(File file) throws ApplicationException {
    boolean isFile = file.isFile();
    if (isFile) {
      notifyListeners(getFormattedWithPoints(
              INFO_PROGRESS_DELETING_FILE.get(file.getAbsolutePath())));
    } else {
      notifyListeners(getFormattedWithPoints(
              INFO_PROGRESS_DELETING_DIRECTORY.get(file.getAbsolutePath())));
    if (isVerbose())
    {
      if (isFile) {
        notifyListeners(getFormattedWithPoints(
            INFO_PROGRESS_DELETING_FILE.get(file.getAbsolutePath())));
      } else {
        notifyListeners(getFormattedWithPoints(
            INFO_PROGRESS_DELETING_DIRECTORY.get(file.getAbsolutePath())));
      }
    }
    boolean delete = false;
@@ -1153,7 +1201,10 @@
          errMsg, null);
    }
    notifyListeners(getFormattedDoneWithLineBreak());
    if (isVerbose())
    {
      notifyListeners(getFormattedDoneWithLineBreak());
    }
  }
  private boolean equalsOrDescendant(File file, File directory) {