public ProjectImportData getProjectImportData(
      final JiraServiceContext jiraServiceContext,
      final ProjectImportOptions projectImportOptions,
      final BackupProject backupProject,
      final BackupSystemInformation backupSystemInformation,
      final TaskProgressInterval taskProgressInterval) {
    Null.not("backupProject", backupProject);
    Null.not("projectImportOptions", projectImportOptions);
    Null.not("backupSystemInformation", backupSystemInformation);
    validateJiraServiceContext(jiraServiceContext);

    // The user must have the system administrator permission to perform a project import
    if (!userHasSysAdminPermission(jiraServiceContext.getUser())) {
      jiraServiceContext
          .getErrorCollection()
          .addErrorMessage(
              getText(
                  jiraServiceContext.getI18nBean(), "admin.errors.project.import.must.be.admin"));
      return null;
    }

    final ErrorCollection errorCollection = jiraServiceContext.getErrorCollection();
    final I18nHelper i18n = jiraServiceContext.getI18nBean();
    final ProjectImportData projectImportData;
    try {
      // First step is to go through the import file again, populating our mappers and creating
      // partitioned XML files.
      // Create the Task Progress Processor for this subtask.
      EntityCountTaskProgressProcessor taskProgressProcessor = null;
      if (taskProgressInterval != null) {
        taskProgressProcessor =
            new EntityCountTaskProgressProcessor(
                taskProgressInterval,
                i18n.getText(
                    "admin.message.project.import.manager.do.mapping.extracting.project.data"),
                backupSystemInformation.getEntityCount(),
                i18n);
      }
      projectImportData =
          projectImportManager.getProjectImportData(
              projectImportOptions, backupProject, backupSystemInformation, taskProgressProcessor);
    } catch (final IOException e) {
      log.error(
          "There was a problem accessing the file '"
              + projectImportOptions.getPathToBackupXml()
              + "' when performing a project import.",
          e);
      errorCollection.addErrorMessage(
          getText(
              i18n,
              "admin.errors.project.import.problem.reading.backup",
              projectImportOptions.getPathToBackupXml()));
      return null;
    } catch (final SAXException e) {
      log.error(
          "There was a problem with the SAX parsing of the file '"
              + projectImportOptions.getPathToBackupXml()
              + "' when performing a project import.");
      errorCollection.addErrorMessage(
          getText(
              i18n,
              "admin.errors.project.import.sax.problem",
              projectImportOptions.getPathToBackupXml(),
              e.getMessage()));
      return null;
    }
    return projectImportData;
  }