/** Automatically close if not error has occured. */
 void uploadSessionFinished() {
   uploadAborted = false;
   if (!errorOccured && !artifactUploadState.isStatusPopupMinimized()) {
     clearWindow();
   }
   artifactUploadState.setUploadCompleted(true);
   minimizeButton.setEnabled(false);
   closeButton.setEnabled(true);
   confirmDialog.getWindow().close();
   UI.getCurrent().removeWindow(confirmDialog.getWindow());
 }
 void uploadSessionStarted() {
   if (artifactUploadState.getNumberOfFilesActuallyUpload().intValue() == 0
       && artifactUploadState.getNumberOfFileUploadsFailed().intValue() == 0
       && !artifactUploadState.isStatusPopupMinimized()) {
     openWindow();
   }
   if (!uploadAborted) {
     minimizeButton.setEnabled(true);
     closeButton.setEnabled(true);
     artifactUploadState.setUploadCompleted(false);
   }
 }