Class AbstractDownloadExporter

java.lang.Object
fr.becpg.repo.download.AbstractDownloadExporter
All Implemented Interfaces:
DownloadProgressReporter
Direct Known Subclasses:
AbstractSearchDownloadExporter, ExcelDataListDownloadExporter

public abstract class AbstractDownloadExporter extends Object implements DownloadProgressReporter

Abstract AbstractDownloadExporter class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • logger

      private static org.apache.commons.logging.Log logger
      Constant logger
    • STATUS_UPDATE_FREQUENCY

      private static final int STATUS_UPDATE_FREQUENCY
      Constant STATUS_UPDATE_FREQUENCY=50
      See Also:
    • downloadNodeRef

      private org.alfresco.service.cmr.repository.NodeRef downloadNodeRef
    • sequenceNumber

      private int sequenceNumber
    • filesAddedCount

      private long filesAddedCount
    • fileCount

      private long fileCount
    • transactionHelper

      protected org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper
    • downloadStorage

      protected org.alfresco.repo.download.DownloadStorage downloadStorage
    • updateService

      protected org.alfresco.repo.download.DownloadStatusUpdateService updateService
    • tempFile

      protected File tempFile
  • Constructor Details

    • AbstractDownloadExporter

      protected AbstractDownloadExporter(org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper, org.alfresco.repo.download.DownloadStatusUpdateService updateService, org.alfresco.repo.download.DownloadStorage downloadStorage, org.alfresco.service.cmr.repository.NodeRef downloadNodeRef, Long nbOfLines)

      Constructor for ExcelSearchDownloadExporter.

      Parameters:
      transactionHelper - a RetryingTransactionHelper object.
      updateService - a DownloadStatusUpdateService object.
      downloadStorage - a DownloadStorage object.
      downloadNodeRef - a NodeRef object.
      nbOfLines - a Long object.
  • Method Details

    • getFilesAddedCount

      public long getFilesAddedCount()

      Getter for the field filesAddedCount.

      Returns:
      a long.
    • getFileCount

      public long getFileCount()

      Getter for the field fileCount.

      Returns:
      a long.
    • buildStatus

      public 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.
      Specified by:
      buildStatus in interface DownloadProgressReporter
      Parameters:
      status - a DownloadStatus.Status object
      Returns:
      a DownloadStatus object
    • updateStatus

      public void updateStatus()

      updateStatus.

    • getNextSequenceNumber

      public int getNextSequenceNumber()

      getNextSequenceNumber.

      Specified by:
      getNextSequenceNumber in interface DownloadProgressReporter
      Returns:
      a int.
    • incFilesAddedCount

      public long incFilesAddedCount()

      getNextFilesAddedCount.

      Returns:
      a int.
    • setTempFile

      public void setTempFile(File tempFile)

      Setter for the field tempFile.

      Parameters:
      tempFile - a File object