Interface DownloadProgressReporter

All Known Implementing Classes:
AbstractDownloadExporter, AbstractSearchDownloadExporter, BeCPGZipDownloadExporter, ExcelDataListDownloadExporter, ExcelSearchDownloadExporter, ReportSearchDownloadExporter, ZipSearchDownloadExporter

public interface DownloadProgressReporter
Reports the progress of a download archive creation. Implemented by the exporters so that the actions driving them can publish a status without knowing how each exporter counts its work.
Version:
$Id: $Id
Author:
matthieu
  • Method Summary

    Modifier and Type
    Method
    Description
    org.alfresco.service.cmr.download.DownloadStatus
    buildStatus(org.alfresco.service.cmr.download.DownloadStatus.Status status)
    Build the download status to publish for the given state, using the progress counters of the exporter.
    default String
    File extension of the produced archive, used to set the mimetype of the download node.
    int
    getNextSequenceNumber.
    default void
    Release whatever the exporter still holds once the export is over, successful or not.
  • Method Details

    • buildStatus

      org.alfresco.service.cmr.download.DownloadStatus buildStatus(org.alfresco.service.cmr.download.DownloadStatus.Status status)
      Build the download status to publish for the given state, using the progress counters of the exporter.
      Parameters:
      status - a DownloadStatus.Status object
      Returns:
      a DownloadStatus object
    • getNextSequenceNumber

      int getNextSequenceNumber()

      getNextSequenceNumber.

      Returns:
      the sequence number of the next status update
    • getExtension

      default String getExtension()
      File extension of the produced archive, used to set the mimetype of the download node.
      Returns:
      the extension, or null when the default mimetype has to be kept
    • releaseResources

      default void releaseResources()
      Release whatever the exporter still holds once the export is over, successful or not. An exporter spilling to disk leaves its temporary files behind when the export fails halfway, so the action calls this on every outcome. Implementations must tolerate being called twice.