Class ImporterActionExecuter

    • Constructor Detail

      • ImporterActionExecuter

        public ImporterActionExecuter()
    • Method Detail

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