Class AbstractS3Processor

    • Field Detail

      • logger

        protected org.slf4j.Logger logger
      • builderConfigurer

        protected AwsClientBuilderConfigurer builderConfigurer
        Helper class the configures credentials and other properties for a AmazonS3 client.
      • s3Url

        protected com.amazonaws.services.s3.AmazonS3URI s3Url
        AWS S3 bucket URL
      • threadPoolTaskExecutor

        protected org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor threadPoolTaskExecutor
        Thread pool to use for TransferManager instances
    • Constructor Detail

      • AbstractS3Processor

        public AbstractS3Processor​(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor threadPoolTaskExecutor)
    • Method Detail

      • doInit

        protected void doInit​(org.apache.commons.configuration2.Configuration config)
                       throws org.craftercms.commons.config.ConfigurationException
        Allows extending classes perform any custom initialization
        Specified by:
        doInit in class AbstractDeploymentProcessor
        Parameters:
        config - the bean's configuration
        Throws:
        org.craftercms.commons.config.ConfigurationException - if there's configuration related exception
      • getS3BaseKey

        protected String getS3BaseKey()
        Returns the base key from the S3 URL, making sure to replace the {siteName} macro instances
      • getS3Key

        protected String getS3Key​(String file)
        Builds the AWS S3 key for the given file
        Parameters:
        file - relative path of the file
        Returns:
        the full S3 key
      • buildClient

        protected com.amazonaws.services.s3.AmazonS3 buildClient()
        Builds the AmazonS3 client.
      • buildTransferManager

        protected com.amazonaws.services.s3.transfer.TransferManager buildTransferManager​(com.amazonaws.services.s3.AmazonS3 client)
        Builds the TransferManager using the shared ExecutorService