public void promptForNewFolder() {
   boolean done = false;
   String defaultText = "New Folder";
   String text = defaultText;
   while (!done) {
     if (text == null) {
       text = defaultText;
     }
     TextInputDialog textDialog =
         new TextInputDialog(
             Messages.getString("VfsBrowser.enterNewFolderName"), text, 500, 160); // $NON-NLS-1$
     text = textDialog.open();
     if (text != null && !"".equals(text)) { // $NON-NLS-1$
       try {
         vfsBrowser.createFolder(text); // $NON-NLS-1$
         done = true;
       } catch (FileSystemException e) {
         MessageBox errorDialog = new MessageBox(newFolderButton.getShell(), SWT.OK);
         errorDialog.setText(Messages.getString("VfsBrowser.error")); // $NON-NLS-1$
         if (e.getCause() != null) {
           errorDialog.setMessage(e.getCause().getMessage());
         } else {
           errorDialog.setMessage(e.getMessage());
         }
         errorDialog.open();
       }
     } else {
       done = true;
     }
   }
 }
 {
   try {
     fsManager = VFSFactory.createDefaultFileSystemManager();
   } catch (FileSystemException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     logger.error("Could nnot create Default FileSystem Manager", e);
   }
 }
예제 #3
0
 public OpcPackage get(String filepath) throws Docx4JException {
   OpcPackage thePackage = null;
   try {
     FileObject fo = VFS.getManager().resolveFile(filepath);
     thePackage = getPackageFromFileObject(fo);
   } catch (FileSystemException exc) {
     exc.printStackTrace();
     throw new Docx4JException("Couldn't get FileObject", exc);
   }
   return thePackage;
 }
예제 #4
0
  public boolean zipFiles(
      ServerDetailsDTO conDetails, String outputFileName, List<String> fileNames, String filePath) {
    UserAuthenticator auth =
        new StaticUserAuthenticator(null, conDetails.getUserName(), conDetails.getPassword());
    FileSystemOptions opts = new FileSystemOptions();
    FileObject fileObject = null;
    StandardFileSystemManager manager = null;
    manager = new StandardFileSystemManager();
    try {
      manager.init();
    } catch (FileSystemException e1) {
      e1.printStackTrace();
      return false;
    }
    try {
      DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
      SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(opts, "no");
    } catch (FileSystemException e) {
      e.printStackTrace();
      return false;
    }
    try {
      System.out.println("Output to Zip : " + outputFileName);
      String fileUri = buildUri(conDetails, filePath + outputFileName);
      fileObject = manager.resolveFile(fileUri, opts);
      OutputStream os = fileObject.getContent().getOutputStream();
      ZipOutputStream zos = new ZipOutputStream(os);
      for (String file : fileNames) {
        System.out.println("File Added : " + file);
        ZipEntry ze = new ZipEntry(file);
        zos.putNextEntry(ze);
        zos.write(readFile(conDetails, filePath + file));
      }
      zos.closeEntry();
      // remember close it
      zos.close();
      return true;
    } catch (IOException ex) {
      ex.printStackTrace();
      return false;
    } finally {
      try {

        FileSystem fs = null;

        if (fileObject != null) {
          fs = fileObject.getFileSystem();
          manager.closeFileSystem(fs);
        }
      } finally {
      }
    }
  }
  public void fireFileObjectDoubleClicked(FileObject selectedItem) {
    if (fileDialogMode != VFS_DIALOG_SAVEAS) {
      // let's try drilling into the file as a new vfs root first

      String scheme = null;
      if (selectedItem.getName().getExtension().contains("jar")) {
        scheme = "jar:";
      } else if (selectedItem.getName().getExtension().contains("zip")) {
        scheme = "zip:";
      } else if (selectedItem.getName().getExtension().contains("gz")) {
        scheme = "gz:";
      } else if (selectedItem.getName().getExtension().contains("war")) {
        scheme = "war:";
      } else if (selectedItem.getName().getExtension().contains("ear")) {
        scheme = "ear:";
      } else if (selectedItem.getName().getExtension().contains("sar")) {
        scheme = "sar:";
      } else if (selectedItem.getName().getExtension().contains("tar")) {
        scheme = "tar:";
      } else if (selectedItem.getName().getExtension().contains("tbz2")) {
        scheme = "tbz2:";
      } else if (selectedItem.getName().getExtension().contains("tgz")) {
        scheme = "tgz:";
      } else if (selectedItem.getName().getExtension().contains("bz2")) {
        scheme = "bz2:";
      }

      if (scheme != null) {
        try {
          FileObject jarFileObject =
              selectedItem
                  .getFileSystem()
                  .getFileSystemManager()
                  .resolveFile(scheme + selectedItem.getName().getURI());
          vfsBrowser.resetVfsRoot(jarFileObject);
          updateParentFileCombo(jarFileObject);
          vfsBrowser.fileSystemTree.forceFocus();
        } catch (FileSystemException e) {
          e.printStackTrace();
          okPressed = true;
          hideCustomPanelChildren();
          dialog.dispose();
        }
      } else {
        okPressed = true;
        hideCustomPanelChildren();
        dialog.dispose();
      }

    } else {
      // anything?
    }
  }
 public PentahoXmlaServlet() {
   super();
   repo = PentahoSystem.get(IUnifiedRepository.class);
   mondrianCatalogService =
       (MondrianCatalogHelper) PentahoSystem.get(IMondrianCatalogService.class);
   try {
     DefaultFileSystemManager dfsm = (DefaultFileSystemManager) VFS.getManager();
     if (dfsm.hasProvider("mondrian") == false) {
       dfsm.addProvider("mondrian", new MondrianVfs());
     }
   } catch (FileSystemException e) {
     logger.error(e.getMessage());
   }
 }
예제 #7
0
  /**
   * Save the contained Package as a Zip file in the file system
   *
   * @param filepath The destination file path whose syntax has to follow Apache Commons-VFS uri
   *     file system syntax.
   * @return true if successful; false, otherwise.
   * @throws Docx4JException if there is an error
   */
  public boolean save(String filepath) throws Docx4JException {
    log.info("Saving to" + filepath);

    boolean success = true;

    try {
      FileObject fo = VFS.getManager().resolveFile(filepath);
      success = save(fo);
    } catch (FileSystemException exc) {
      exc.printStackTrace();
      throw new Docx4JException("Couldn't get FileObject", exc);
    }

    return success;
  }
  public void okPressed() {
    if (fileDialogMode == VFS_DIALOG_SAVEAS && "".equals(fileNameText.getText())) { // $NON-NLS-1$
      // do nothing, user did not enter a file name for saving
      MessageBox messageDialog = new MessageBox(dialog, SWT.OK);
      messageDialog.setText(Messages.getString("VfsFileChooserDialog.error")); // $NON-NLS-1$
      messageDialog.setMessage(
          Messages.getString("VfsFileChooserDialog.noFilenameEntered")); // $NON-NLS-1$
      messageDialog.open();
      return;
    }

    if (fileDialogMode == VFS_DIALOG_SAVEAS) {
      try {
        FileObject toBeSavedFile =
            vfsBrowser.getSelectedFileObject().resolveFile(fileNameText.getText());
        if (toBeSavedFile.exists()) {
          MessageBox messageDialog = new MessageBox(dialog, SWT.YES | SWT.NO);
          messageDialog.setText(
              Messages.getString("VfsFileChooserDialog.fileExists")); // $NON-NLS-1$
          messageDialog.setMessage(
              Messages.getString("VfsFileChooserDialog.fileExistsOverwrite")); // $NON-NLS-1$
          int flag = messageDialog.open();
          if (flag == SWT.NO) {
            return;
          }
        }
      } catch (FileSystemException e) {
        e.printStackTrace();
      }
    }
    if (fileDialogMode == VFS_DIALOG_SAVEAS) {
      enteredFileName = fileNameText.getText();
    }

    try {
      if (fileDialogMode == VFS_DIALOG_OPEN_FILE
          && vfsBrowser.getSelectedFileObject().getType().equals(FileType.FOLDER)) {
        // try to open this node, it is a directory
        vfsBrowser.selectTreeItemByFileObject(vfsBrowser.getSelectedFileObject(), true);
        return;
      }
    } catch (FileSystemException e) {
    }

    okPressed = true;
    hideCustomPanelChildren();
    dialog.dispose();
  }
 public void resolveVfsBrowser() {
   FileObject newRoot = null;
   try {
     //      newRoot =
     // rootFile.getFileSystem().getFileSystemManager().resolveFile(getSelectedFile().getName().getURI());
     if (currentPanel != null) {
       newRoot = currentPanel.resolveFile(getSelectedFile().getName().getURI());
     }
   } catch (FileSystemException e) {
     displayMessageBox(SWT.OK, Messages.getString("VfsFileChooserDialog.error"), e.getMessage());
   }
   // if (newRoot != null && !newRoot.equals(vfsBrowser.getRootFileObject())) {
   if (newRoot != null) {
     vfsBrowser.resetVfsRoot(newRoot);
   }
 }
예제 #10
0
  public OpcPackage getPackageFromFileObject(FileObject fo) throws Docx4JException {
    OpcPackage thePackage = null;

    if (!(fo instanceof LocalFile)) {
      // Non-Local file such as webdav file.
      // We make a temporary local copy of the file.
      // TODO: 28/03/08 - This is a second approach of dealing with non-local file.
      // The first approach which is more preferable and done in SVN version 233
      // does not create a temporary local copy of the file.
      // It uses Commons-VFS "zip://" uri scheme to directly access the non-local file.
      // This second approach is being carried out because the writing operation cannot
      // use Commons-VFS "zip://" scheme as the scheme does not support writing to
      // zip file yet.
      // TODO: 28/03/08 - DO NOT use "tmp://" scheme to make a temporary file.
      // as it is going to fail. The current Commons-VFS library is still buggy.
      StringBuffer sb = new StringBuffer("file:///");
      sb.append(System.getProperty("user.home"));
      sb.append("/.docx4j/tmp/");
      sb.append(fo.getName().getBaseName());
      String tmpPath = sb.toString().replace('\\', '/');

      LocalFile localCopy = null;
      try {
        localCopy = (LocalFile) VFS.getManager().resolveFile(tmpPath);
        localCopy.copyFrom(fo, new FileTypeSelector(FileType.FILE));
        localCopy.close();

        thePackage = getPackageFromLocalFile(localCopy);
      } catch (FileSystemException exc) {
        exc.printStackTrace();
        throw new Docx4JException("Could not create a temporary local copy", exc);
      } finally {
        if (localCopy != null) {
          try {
            localCopy.delete();
          } catch (FileSystemException exc) {
            exc.printStackTrace();
            log.warn("Couldn't delete temporary file " + tmpPath);
          }
        }
      }
    } else {
      thePackage = getPackageFromLocalFile((LocalFile) fo);
    }

    return thePackage;
  }
예제 #11
0
  /**
   * Save the contained Package as a Zip file in the file system
   *
   * @param docxFile A destination FileObject
   * @return true if successful; false, otherwise.
   * @throws Docx4JException if there is an error
   */
  public boolean save(FileObject docxFile) throws Docx4JException {
    log.info("Saving to" + docxFile);

    boolean success = false;

    try {
      OutputStream docxOut = docxFile.getContent().getOutputStream();
      success = _saveToZipFile.save(docxOut);
    } catch (FileSystemException exc) {
      exc.printStackTrace();
      throw new Docx4JException("Failed to save package", exc);
    }

    try {
      docxFile.close();
    } catch (FileSystemException exc) {; // ignore
    }

    return success;
  }
 public void promptForNewVfsRoot() {
   boolean done = false;
   String defaultText = vfsBrowser.rootFileObject.getName().getURI();
   String text = defaultText;
   while (!done) {
     if (text == null) {
       text = defaultText;
     }
     File fileRoots[] = File.listRoots();
     String roots[] = new String[fileRoots.length];
     for (int i = 0; i < roots.length; i++) {
       try {
         roots[i] = fileRoots[i].toURI().toURL().toExternalForm();
       } catch (MalformedURLException e) {
         e.printStackTrace();
       }
     }
     ComboBoxInputDialog textDialog =
         new ComboBoxInputDialog(
             Messages.getString("VfsFileChooserDialog.enterNewVFSRoot"),
             text,
             roots,
             650,
             100); //$NON-NLS-1$
     text = textDialog.open();
     if (text != null && !"".equals(text)) { // $NON-NLS-1$
       try {
         vfsBrowser.resetVfsRoot(currentPanel.resolveFile(text));
         done = true;
       } catch (FileSystemException e) {
         MessageBox errorDialog = new MessageBox(vfsBrowser.getDisplay().getActiveShell(), SWT.OK);
         errorDialog.setText(Messages.getString("VfsFileChooserDialog.error")); // $NON-NLS-1$
         errorDialog.setMessage(e.getMessage());
         errorDialog.open();
       }
     } else {
       done = true;
     }
   }
 }
  public void widgetSelected(SelectionEvent se) {
    if (se.widget == openFileCombo) {
      // String filePath = parentFoldersCombo.getItem(parentFoldersCombo.getSelectionIndex());
      // vfsBrowser.selectTreeItemByName(filePath, true);

      try {
        // resolve the selected folder (without displaying access/secret keys in plain text)
        //        FileObject newRoot =
        // rootFile.getFileSystem().getFileSystemManager().resolveFile(folderURL.getFolderURL(openFileCombo.getText()));
        FileObject newRoot = currentPanel.resolveFile(getSelectedFile().getName().getURI());
        vfsBrowser.resetVfsRoot(newRoot);
      } catch (FileSystemException e) {
      }

    } else if (se.widget == okButton) {
      okPressed();
    } else if (se.widget == folderUpButton) {
      try {
        FileObject newRoot = vfsBrowser.getSelectedFileObject().getParent();
        if (newRoot != null) {
          vfsBrowser.resetVfsRoot(newRoot);
          vfsBrowser.setSelectedFileObject(newRoot);
          // make sure access/secret keys not displayed in plain text
          //          String str = folderURL.setFolderURL(newRoot.getName().getURI());
          openFileCombo.setText(newRoot.getName().getURI());
        }
      } catch (Exception e) {
        // top of root
      }
    } else if (se.widget == newFolderButton) {
      promptForNewFolder();
    } else if (se.widget == deleteFileButton) {
      MessageBox messageDialog =
          new MessageBox(se.widget.getDisplay().getActiveShell(), SWT.YES | SWT.NO);
      messageDialog.setText(Messages.getString("VfsFileChooserDialog.confirm")); // $NON-NLS-1$
      messageDialog.setMessage(
          Messages.getString("VfsFileChooserDialog.deleteFile")); // $NON-NLS-1$
      int status = messageDialog.open();
      if (status == SWT.YES) {
        try {
          vfsBrowser.deleteSelectedItem();
        } catch (FileSystemException e) {
          MessageBox errorDialog = new MessageBox(se.widget.getDisplay().getActiveShell(), SWT.OK);
          errorDialog.setText(Messages.getString("VfsFileChooserDialog.error")); // $NON-NLS-1$
          errorDialog.setMessage(e.getMessage());
          errorDialog.open();
        }
      }
      // } else if (se.widget == changeRootButton) {
      // promptForNewVfsRoot();
    } else if (se.widget == fileFilterCombo) {

      Runnable r =
          new Runnable() {
            public void run() {
              String filter = fileFilters[fileFilterCombo.getSelectionIndex()];
              vfsBrowser.setFilter(filter);
              try {
                vfsBrowser.applyFilter();
              } catch (FileSystemException e) {
                MessageBox mb = new MessageBox(newFolderButton.getShell(), SWT.OK);
                mb.setText(
                    Messages.getString("VfsFileChooserDialog.errorApplyFilter")); // $NON-NLS-1$
                mb.setMessage(e.getMessage());
                mb.open();
              }
            }
          };
      BusyIndicator.showWhile(fileFilterCombo.getDisplay(), r);
    } else {
      okPressed = false;
      hideCustomPanelChildren();
      dialog.dispose();
    }
  }
  public FileObject open(
      Shell applicationShell,
      String[] schemeRestrictions,
      String initialScheme,
      boolean showFileScheme,
      String fileName,
      String[] fileFilters,
      String[] fileFilterNames,
      boolean returnUserAuthenticatedFile,
      int fileDialogMode,
      boolean showLocation,
      boolean showCustomUI) {

    this.fileDialogMode = fileDialogMode;
    this.fileFilters = fileFilters;
    this.fileFilterNames = fileFilterNames;
    this.applicationShell = applicationShell;
    this.showFileScheme = showFileScheme;
    this.initialScheme = initialScheme;
    this.schemeRestrictions = schemeRestrictions;
    this.showLocation = showLocation;
    this.showCustomUI = showCustomUI;

    FileObject tmpInitialFile = initialFile;

    if (defaultInitialFile != null && rootFile == null) {
      try {
        rootFile = defaultInitialFile.getFileSystem().getRoot();
        initialFile = defaultInitialFile;
      } catch (FileSystemException ignored) {
        // well we tried
      }
    }

    createDialog(applicationShell);

    if (!showLocation) {
      comboPanel.setParent(fakeShell);
    } else {
      comboPanel.setParent(customUIPanel);
    }

    if (!showCustomUI) {
      customUIPanel.setParent(fakeShell);
    } else {
      customUIPanel.setParent(dialog);
    }

    // create our file chooser tool bar, contains parent folder combo and various controls
    createToolbarPanel(dialog);
    // create our vfs browser component
    createVfsBrowser(dialog);
    populateCustomUIPanel(dialog);
    if (fileDialogMode == VFS_DIALOG_SAVEAS) {
      createFileNamePanel(dialog, fileName);
    } else {
      // create file filter panel
      createFileFilterPanel(dialog);
    }
    // create our ok/cancel buttons
    createButtonPanel(dialog);

    initialFile = tmpInitialFile;
    // set the initial file selection
    try {
      if (initialFile != null || rootFile != null) {
        vfsBrowser.selectTreeItemByFileObject(initialFile != null ? initialFile : rootFile, true);
        updateParentFileCombo(initialFile != null ? initialFile : rootFile);
        setSelectedFile(initialFile != null ? initialFile : rootFile);
        openFileCombo.setText(
            initialFile != null ? initialFile.getName().getURI() : rootFile.getName().getURI());
      }
    } catch (FileSystemException e) {
      MessageBox box = new MessageBox(dialog.getShell());
      box.setText(Messages.getString("VfsFileChooserDialog.error")); // $NON-NLS-1$
      box.setMessage(e.getMessage());
      box.open();
    }

    // set the size and show the dialog
    int height = 550;
    int width = 800;
    dialog.setSize(width, height);
    Rectangle bounds = dialog.getDisplay().getPrimaryMonitor().getClientArea();
    int x = (bounds.width - width) / 2;
    int y = (bounds.height - height) / 2;
    dialog.setLocation(x, y);
    dialog.open();

    if (rootFile != null && fileDialogMode == VFS_DIALOG_SAVEAS) {
      if (!rootFile.getFileSystem().hasCapability(Capability.WRITE_CONTENT)) {
        MessageBox messageDialog = new MessageBox(dialog.getShell(), SWT.OK);
        messageDialog.setText(Messages.getString("VfsFileChooserDialog.warning")); // $NON-NLS-1$
        messageDialog.setMessage(
            Messages.getString("VfsFileChooserDialog.noWriteSupport")); // $NON-NLS-1$
        messageDialog.open();
      }
    }

    vfsBrowser.fileSystemTree.forceFocus();
    while (!dialog.isDisposed()) {
      if (!dialog.getDisplay().readAndDispatch()) dialog.getDisplay().sleep();
    }

    // we just woke up, we are probably disposed already..
    if (!dialog.isDisposed()) {
      hideCustomPanelChildren();
      dialog.dispose();
    }
    if (okPressed) {
      FileObject returnFile = vfsBrowser.getSelectedFileObject();
      if (returnFile != null && fileDialogMode == VFS_DIALOG_SAVEAS) {
        try {
          if (returnFile.getType().equals(FileType.FILE)) {
            returnFile = returnFile.getParent();
          }
          returnFile = returnFile.resolveFile(enteredFileName);
        } catch (FileSystemException e) {
          e.printStackTrace();
        }
      }

      // put user/pass on the filename so it comes out in the getUri call.
      if (!returnUserAuthenticatedFile) {
        // make sure to put the user/pass on the url if it's not there
        if (returnFile != null && returnFile.getName() instanceof URLFileName) {
          URLFileName urlFileName = (URLFileName) returnFile.getName();
          if (urlFileName.getUserName() == null || urlFileName.getPassword() == null) {
            // set it
            String user = "";
            String pass = "";

            UserAuthenticator userAuthenticator =
                DefaultFileSystemConfigBuilder.getInstance()
                    .getUserAuthenticator(returnFile.getFileSystem().getFileSystemOptions());

            if (userAuthenticator != null) {
              UserAuthenticationData data =
                  userAuthenticator.requestAuthentication(AUTHENTICATOR_TYPES);
              user = String.valueOf(data.getData(UserAuthenticationData.USERNAME));
              pass = String.valueOf(data.getData(UserAuthenticationData.PASSWORD));
              try {
                user = URLEncoder.encode(user, "UTF-8");
                pass = URLEncoder.encode(pass, "UTF-8");
              } catch (UnsupportedEncodingException e) {
                // ignore, just use the un encoded values
              }
            }

            // build up the url with user/pass on it
            int port = urlFileName.getPort();
            String portString = (port < 1) ? "" : (":" + port);
            String urlWithUserPass =
                urlFileName.getScheme()
                    + "://"
                    + user
                    + ":"
                    + pass
                    + "@"
                    + urlFileName.getHostName()
                    + portString
                    + urlFileName.getPath();

            try {
              returnFile = currentPanel.resolveFile(urlWithUserPass);
            } catch (FileSystemException e) {
              // couldn't resolve with user/pass on url??? interesting
              e.printStackTrace();
            }
          }
        }
      }
      return returnFile;
    } else {
      return null;
    }
  }
  /**
   * Retrieves the output files produced by the job having the id given as argument. If the transfer
   * finishes successfully it deletes the temporary folders (at push_url and pull_url location) and
   * send notification to the listeners. Otherwise it notifies the listeners of the failure.
   *
   * <p>The transfer data operation is executed by a fixed thread pool executor (see {@link
   * DataTransferProcessor})
   *
   * @param awaitedjob
   * @return
   * @throws FileSystemException
   */
  protected void pullData(AwaitedJob awaitedjob) {
    String localOutFolderPath = awaitedjob.getLocalOutputFolder();
    if (localOutFolderPath == null) {
      logger.warn(
          "The job "
              + awaitedjob.getJobId()
              + " does not define an output folder on local machine. No output data will be retrieved");
      return;
    }

    String jobId = awaitedjob.getJobId();
    String pull_URL = awaitedjob.getPullURL();
    String pushUrl = awaitedjob.getPushURL();

    FileObject remotePullFolder = null;
    FileObject remotePushFolder = null;
    FileObject localfolder = null;

    Set<FileObject> foldersToDelete = new HashSet<FileObject>();

    try {
      remotePullFolder = fsManager.resolveFile(pull_URL);
      remotePushFolder = fsManager.resolveFile(pushUrl);
      localfolder = fsManager.resolveFile(localOutFolderPath);
    } catch (Exception e) {
      logger.error("Could not retrieve data for job " + jobId, e);
      logger.info(
          "Job  "
              + jobId
              + " will be removed from the known job list. The system will not attempt again to retrieve data for this job. You couyld try to manually copy the data from the location  "
              + pull_URL);
      removeAwaitedJob(jobId);
      return;
    }

    try {
      foldersToDelete.add(remotePullFolder.getParent());
      if (!remotePullFolder.getParent().equals(remotePushFolder.getParent()))
        foldersToDelete.add(remotePushFolder.getParent());
    } catch (FileSystemException e) {
      logger.warn(
          "Data in folders "
              + pull_URL
              + " and "
              + pushUrl
              + " cannot be deleted due to an unexpected error ",
          e);
      e.printStackTrace();
    }

    FileSelector fileSelector = Selectors.SELECT_ALL;
    // The code bellow has been commented:
    // We do not need to build a file selector because the files in the temporary folder
    // have been copied by the data space layer which already used a FastFileSelector
    // configured with includes and excludes patterns

    //         DSFileSelector fileSelector  = new DSFileSelector();
    //          try{
    //            JobState jobstate = uischeduler.getJobState(jobId);
    //            for (TaskState ts : jobstate.getTasks() )
    //     	   {
    //         	 List<OutputSelector> of =  ts.getOutputFilesList();
    //         	 for (OutputSelector outputSelector : of) {
    //         		 org.ow2.proactive.scheduler.common.task.dataspaces.FileSelector fs =
    // outputSelector.getOutputFiles();
    //
    //         		fileSelector.addIncludes(fs.getIncludes());
    //         		fileSelector.addExcludes(fs.getExcludes());
    //     		}
    //     	   }
    //          }catch (Exception e)
    //     	   {
    //     		 logger_util.error("An exception occured while computing which output files to download
    // for job "+ jobId+". All available files will be downloaded for this job");
    //         	 e.printStackTrace();
    //     	   }

    DataTransferProcessor dtp =
        new DataTransferProcessor(
            remotePullFolder, localfolder, jobId, foldersToDelete, fileSelector);
    tpe.submit(dtp);
  }