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.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 org.alfresco.repo.action.executer.ActionExecuterAbstractBase
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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.alfresco.service.cmr.coci.CheckOutCheckInService
     
    private org.alfresco.repo.download.ContentServiceHelper
     
    private static final String
     
    private org.alfresco.service.cmr.dictionary.DictionaryService
     
    private org.alfresco.repo.download.DownloadStorage
     
     
    private org.alfresco.service.cmr.view.ExporterService
     
    private static final org.slf4j.Logger
     
    private long
     
    private org.alfresco.service.cmr.repository.NodeService
     
    private org.alfresco.service.cmr.security.PermissionService
     
    private static final String
     
    private static final String
     
    private org.alfresco.repo.transaction.RetryingTransactionHelper
     
    private org.alfresco.repo.download.DownloadStatusUpdateService
     

    Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase

    actionAccessRestrictions, actionDefinition, applicableTypes, publicAction

    Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase

    adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService

    Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase

    name

    Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter

    PARAM_RESULT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addParameterDefinitions(List<org.alfresco.service.cmr.action.ParameterDefinition> paramList)
    private void
    archiveCreationComplete(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, File tempFile, BeCPGZipDownloadExporter handler)
     
    private void
    createDownload(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.view.ExporterCrawlerParameters crawlerParameters, BeCPGCreateDownloadArchiveAction.SizeEstimator estimator)
     
    private void
    downloadCancelled(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, BeCPGZipDownloadExporter handler)
     
    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.
    private void
    maximumContentSizeExceeded(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, long size, long fileCount)
     
    void
    setCheckOutCheckInSerivce(org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService)
    setCheckOutCheckInSerivce.
    void
    setContentServiceHelper(org.alfresco.repo.download.ContentServiceHelper contentServiceHelper)
    Setter for the field contentServiceHelper.
    void
    setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
    void
    setDownloadStorage(org.alfresco.repo.download.DownloadStorage downloadStorage)
    Setter for the field downloadStorage.
    void
    Setter for the field entityService.
    void
    setExporterService(org.alfresco.service.cmr.view.ExporterService exporterService)
    Setter for the field exporterService.
    void
    setMaximumContentSize(long maximumContentSize)
    Set the maximum total size of content that can be added to a single download. -1 indicates no limit.
    void
    setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
    Setter for the field nodeService.
    void
    setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
    Setter for the field permissionService.
    void
    setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper)
    Setter for the field transactionHelper.
    void
    setUpdateService(org.alfresco.repo.download.DownloadStatusUpdateService updateService)
    Setter for the field updateService.

    Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase

    createActionDefinition, execute, getActionAccessRestrictions, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, onLogException, setActionAccessRestrictions, setApplicableTypes, setBaseNodeService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus, verifyActionAccessRestrictions

    Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase

    checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString

    Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase

    setBeanName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.alfresco.repo.action.executer.ActionExecuter

    isExecuteAsynchronously
  • Field Details

    • log

      private static final org.slf4j.Logger log
    • CREATION_ERROR

      private static final String CREATION_ERROR
      See Also:
    • TEMP_FILE_PREFIX

      private static final String TEMP_FILE_PREFIX
      See Also:
    • TEMP_FILE_SUFFIX

      private static final String TEMP_FILE_SUFFIX
      See Also:
    • checkOutCheckInService

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

      private org.alfresco.repo.download.ContentServiceHelper contentServiceHelper
    • downloadStorage

      private org.alfresco.repo.download.DownloadStorage downloadStorage
    • exporterService

      private org.alfresco.service.cmr.view.ExporterService exporterService
    • nodeService

      private org.alfresco.service.cmr.repository.NodeService nodeService
    • transactionHelper

      private org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper
    • updateService

      private org.alfresco.repo.download.DownloadStatusUpdateService updateService
    • 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
    • setContentServiceHelper

      public void setContentServiceHelper(org.alfresco.repo.download.ContentServiceHelper contentServiceHelper)

      Setter for the field contentServiceHelper.

      Parameters:
      contentServiceHelper - a ContentServiceHelper object
    • setDownloadStorage

      public void setDownloadStorage(org.alfresco.repo.download.DownloadStorage downloadStorage)

      Setter for the field downloadStorage.

      Parameters:
      downloadStorage - a DownloadStorage object
    • setExporterService

      public void setExporterService(org.alfresco.service.cmr.view.ExporterService exporterService)

      Setter for the field exporterService.

      Parameters:
      exporterService - a ExporterService 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
    • setNodeService

      public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

      Setter for the field nodeService.

      Parameters:
      nodeService - a NodeService object
    • setTransactionHelper

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

      Setter for the field transactionHelper.

      Parameters:
      transactionHelper - a RetryingTransactionHelper object
    • setUpdateService

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

      Setter for the field updateService.

      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
    • addParameterDefinitions

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

      private void maximumContentSizeExceeded(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, long size, long fileCount)
    • createDownload

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

      private void archiveCreationComplete(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, File tempFile, BeCPGZipDownloadExporter handler)
    • downloadCancelled

      private void downloadCancelled(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, BeCPGZipDownloadExporter handler)