Class ZipSearchAction

java.lang.Object
org.alfresco.repo.action.CommonResourceAbstractBase
org.alfresco.repo.action.ParameterizedItemAbstractBase
org.alfresco.repo.action.executer.ActionExecuterAbstractBase
fr.becpg.repo.report.search.actions.ZipSearchAction
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 ZipSearchAction extends org.alfresco.repo.action.executer.ActionExecuterAbstractBase
ActionExecuter 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:
matthieu form Alex Miller code
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    private org.alfresco.service.cmr.coci.CheckOutCheckInService
     
    private org.alfresco.service.cmr.repository.ContentService
     
    private org.alfresco.repo.download.ContentServiceHelper
     
    private static final String
     
    private org.alfresco.repo.download.DownloadStorage
     
    private org.alfresco.service.cmr.view.ExporterService
     
     
    private static final org.slf4j.Logger
     
    private static final org.apache.commons.logging.Log
     
    private long
     
    static final String
    Constant NAME="zipSearchAction"
    private org.alfresco.service.cmr.repository.NodeService
     
    static final String
    Constant PARAM_TPL_NODEREF="templateNodeRef"
    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, ZipSearchDownloadExporter handler)
     
    private void
    downloadCancelled(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, ZipSearchDownloadExporter 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
    Setter for the field alfrescoRepository.
    void
    setCheckOutCheckInService(org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService)
    Setter for the field checkOutCheckInService.
    void
    setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
    Setter for the field contentService.
    void
    setContentServiceHelper(org.alfresco.repo.download.ContentServiceHelper contentServiceHelper)
    Setter for the field contentServiceHelper.
    void
    setDownloadStorage(org.alfresco.repo.download.DownloadStorage downloadStorage)
    Setter for the field downloadStorage.
    void
    setExporterService(org.alfresco.service.cmr.view.ExporterService exporterService)
    Setter for the field exporterService.
    void
    Setter for the field expressionService.
    void
    setMaximumContentSize(long maximumContentSize)
    Setter for the field maximumContentSize.
    void
    setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
    Setter for the field nodeService.
    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, setDictionaryService, 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:
    • PARAM_TPL_NODEREF

      public static final String PARAM_TPL_NODEREF
      Constant PARAM_TPL_NODEREF="templateNodeRef"
      See Also:
    • logger

      private static final org.apache.commons.logging.Log logger
    • NAME

      public static final String NAME
      Constant NAME="zipSearchAction"
      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
    • contentService

      private org.alfresco.service.cmr.repository.ContentService contentService
    • expressionService

      private ExpressionService expressionService
    • alfrescoRepository

      private AlfrescoRepository<RepositoryEntity> alfrescoRepository
    • maximumContentSize

      private long maximumContentSize
  • Constructor Details

    • ZipSearchAction

      public ZipSearchAction()
  • Method Details

    • setAlfrescoRepository

      public void setAlfrescoRepository(AlfrescoRepository<RepositoryEntity> alfrescoRepository)

      Setter for the field alfrescoRepository.

      Parameters:
      alfrescoRepository - a AlfrescoRepository object
    • setExpressionService

      public void setExpressionService(ExpressionService expressionService)

      Setter for the field expressionService.

      Parameters:
      expressionService - a ExpressionService object
    • setCheckOutCheckInService

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

      Setter for the field checkOutCheckInService.

      Parameters:
      checkOutCheckInService - a CheckOutCheckInService 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.
    • 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.
    • setContentService

      public void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)

      Setter for the field contentService.

      Parameters:
      contentService - a ContentService object.
    • setMaximumContentSize

      public void setMaximumContentSize(long maximumContentSize)

      Setter for the field maximumContentSize.

      Parameters:
      maximumContentSize - a long.
    • 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)
    • archiveCreationComplete

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

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