Package fr.becpg.repo.download
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 TypeMethodDescriptionorg.alfresco.service.cmr.download.DownloadStatusbuildStatus(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 StringFile extension of the produced archive, used to set the mimetype of the download node.intgetNextSequenceNumber.default voidRelease 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- aDownloadStatus.Statusobject- Returns:
- a
DownloadStatusobject
-
getNextSequenceNumber
int getNextSequenceNumber()getNextSequenceNumber.
- Returns:
- the sequence number of the next status update
-
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.
-