Class BeCPGCreateDownloadArchiveAction

java.lang.Object
org.alfresco.repo.action.CommonResourceAbstractBase
org.alfresco.repo.action.ParameterizedItemAbstractBase
org.alfresco.repo.action.executer.ActionExecuterAbstractBase
fr.becpg.repo.download.AbstractDownloadArchiveAction
fr.becpg.repo.download.BeCPGCreateDownloadArchiveAction
All Implemented Interfaces:
org.alfresco.repo.action.executer.ActionExecuter, org.alfresco.repo.action.executer.LoggingAwareExecuter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware

public class BeCPGCreateDownloadArchiveAction extends AbstractDownloadArchiveAction
ActionExecuterAbstractBase for creating an archive (ie. zip) file containing content from the repository. The maximum total size of the content which can be downloaded is controlled by the maximumContentSie property. -1 indicates no limit.
Version:
$Id: $Id
Author:
Alex Miller
  • Field Details

    • log

      private static final org.slf4j.Logger log
      Constant log
    • CREATION_ERROR

      private static final String CREATION_ERROR
      Constant CREATION_ERROR="Unexpected error creating archive file "{trunked}
      See Also:
    • TEMP_FILE_PREFIX

      private static final String TEMP_FILE_PREFIX
      Constant TEMP_FILE_PREFIX="download"
      See Also:
    • TEMP_FILE_SUFFIX

      private static final String TEMP_FILE_SUFFIX
      Constant TEMP_FILE_SUFFIX=".zip"
      See Also:
    • checkOutCheckInService

      private org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService
    • dictionaryService

      private org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
    • entityService

      private EntityService entityService
    • permissionService

      private org.alfresco.service.cmr.security.PermissionService permissionService
    • maximumContentSize

      private long maximumContentSize
  • Constructor Details

    • BeCPGCreateDownloadArchiveAction

      public BeCPGCreateDownloadArchiveAction()
  • Method Details

    • setCheckOutCheckInSerivce

      public void setCheckOutCheckInSerivce(org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService)

      setCheckOutCheckInSerivce.

      Parameters:
      checkOutCheckInService - a CheckOutCheckInService object
    • setPermissionService

      public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)

      Setter for the field permissionService.

      Parameters:
      permissionService - a PermissionService object
    • setEntityService

      public void setEntityService(EntityService entityService)

      Setter for the field entityService.

      Parameters:
      entityService - a EntityService object
    • setMaximumContentSize

      public void setMaximumContentSize(long maximumContentSize)
      Set the maximum total size of content that can be added to a single download. -1 indicates no limit.
      Parameters:
      maximumContentSize - a long
    • setTransactionHelper

      public void setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper)

      Setter for the field transactionHelper.

      Overrides:
      setTransactionHelper in class AbstractDownloadArchiveAction
      Parameters:
      transactionHelper - a RetryingTransactionHelper object
    • setUpdateService

      public void setUpdateService(org.alfresco.repo.download.DownloadStatusUpdateService updateService)

      Setter for the field updateService.

      Overrides:
      setUpdateService in class AbstractDownloadArchiveAction
      Parameters:
      updateService - a DownloadStatusUpdateService object
    • setDictionaryService

      public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Overrides:
      setDictionaryService in class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
    • executeImpl

      protected void executeImpl(org.alfresco.service.cmr.action.Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
      Create an archive file containing content from the repository. Uses the ExporterService with custom exporters to create the archive files.
      Specified by:
      executeImpl in class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
    • createArchiveCrawlerParameters

      private org.alfresco.service.cmr.view.ExporterCrawlerParameters createArchiveCrawlerParameters(org.alfresco.service.cmr.repository.NodeRef[] nodeRefs)
      Build the crawler parameters of a repository archive: the nodes are crawled with their content but without their renditions, discussions, versioned associations nor entity lists.
      Parameters:
      nodeRefs - an array of NodeRef objects
      Returns:
      a ExporterCrawlerParameters object
    • addParameterDefinitions

      protected void addParameterDefinitions(List<org.alfresco.service.cmr.action.ParameterDefinition> paramList)
      Specified by:
      addParameterDefinitions in class org.alfresco.repo.action.ParameterizedItemAbstractBase
    • createDownload

      private void createDownload(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.view.ExporterCrawlerParameters crawlerParameters, BeCPGCreateDownloadArchiveAction.SizeEstimator estimator)