Class ImporterActionExecuter

All Implemented Interfaces:
ActionExecuter, LoggingAwareExecuter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware

public class ImporterActionExecuter extends ActionExecuterAbstractBase
Importer action executor
Author:
gavinc
  • Field Details

  • Constructor Details

    • ImporterActionExecuter

      public ImporterActionExecuter()
  • Method Details

    • setImporterService

      public void setImporterService(ImporterService importerService)
      Sets the ImporterService to use
      Parameters:
      importerService - The ImporterService
    • setNodeService

      public void setNodeService(NodeService nodeService)
      Sets the NodeService to use
      Parameters:
      nodeService - The NodeService
    • setContentService

      public void setContentService(ContentService contentService)
      Sets the ContentService to use
      Parameters:
      contentService - The ContentService
    • setFileFolderService

      public void setFileFolderService(FileFolderService fileFolderService)
      Sets the FileFolderService to use
      Parameters:
      fileFolderService - The FileFolderService
    • isHighByteZip

      public boolean isHighByteZip()
      Returns:
      the highByteZip encoding switch
    • setHighByteZip

      public void setHighByteZip(boolean highByteZip)
      Parameters:
      highByteZip - the encoding switch for high-byte ZIP filenames to set
    • setRatioThreshold

      public void setRatioThreshold(long ratioThreshold)
      Parameters:
      ratioThreshold - the compression ratio threshold for Zip bomb detection
    • setUncompressedBytesLimit

      public void setUncompressedBytesLimit(String limit)
      This method sets a value for the uncompressed bytes limit. If the string does not parse to a java long.
      Parameters:
      limit - a String representing a valid Java long.
    • executeImpl

      public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef)
      Description copied from class: ActionExecuterAbstractBase
      Execute the action implementation
      Specified by:
      executeImpl in class ActionExecuterAbstractBase
      Parameters:
      ruleAction - the action
      actionedUponNodeRef - the actioned upon node
      See Also:
    • addParameterDefinitions

      protected void addParameterDefinitions(List<ParameterDefinition> paramList)
      Description copied from class: ParameterizedItemAbstractBase
      Adds the parameter definitions to the list
      Specified by:
      addParameterDefinitions in class ParameterizedItemAbstractBase
      Parameters:
      paramList - the parameter definitions list
      See Also:
    • extractFile

      public static void extractFile(org.apache.commons.compress.archivers.zip.ZipFile archive, String extractDir)
      Extract the file and folder structure of a ZIP file into the specified directory
      Parameters:
      archive - The ZIP archive to extract
      extractDir - The directory to extract into
    • extractFile

      public static void extractFile(org.apache.commons.compress.archivers.zip.ZipFile archive, String extractDir, org.alfresco.repo.action.executer.ImporterActionExecuter.ExtractionProgressTracker tracker)
      Extract the file and folder structure of a ZIP file into the specified directory using a progress tracker
      Parameters:
      archive - The ZIP archive to extract
      extractDir - The directory to extract into
      tracker - The extraction progress tracker to check against during the extraction process
    • deleteDir

      public static void deleteDir(File dir)
      Recursively delete a dir of files and directories
      Parameters:
      dir - directory to delete