Class S3SyncProcessor

    • Field Detail

      • localRepoUrl

        protected String localRepoUrl
        URL for the local git repository
      • blobExtension

        protected String blobExtension
        The extension used for blob files in the repository
      • ignoreBlobs

        protected boolean ignoreBlobs
        Indicates if blob files should not be uploaded to S3
    • Constructor Detail

      • S3SyncProcessor

        @ConstructorProperties({"threadPoolTaskExecutor","localRepoUrl","blobExtension"})
        public S3SyncProcessor​(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor threadPoolTaskExecutor,
                               String localRepoUrl,
                               String blobExtension)
    • Method Detail

      • doInit

        protected void doInit​(org.apache.commons.configuration2.Configuration config)
                       throws org.craftercms.commons.config.ConfigurationException
        Description copied from class: AbstractS3Processor
        Allows extending classes perform any custom initialization
        Overrides:
        doInit in class AbstractS3Processor
        Parameters:
        config - the bean's configuration
        Throws:
        org.craftercms.commons.config.ConfigurationException - if there's configuration related exception
      • uploadFiles

        protected void uploadFiles​(com.amazonaws.services.s3.AmazonS3 client,
                                   List<String> paths)
                            throws DeployerException
        Performs the upload of the given files.
        Parameters:
        client - AWS S3 client
        paths - list of files to upload
        Throws:
        DeployerException - if there is any error reading or uploading the files
      • deleteFiles

        protected void deleteFiles​(com.amazonaws.services.s3.AmazonS3 client,
                                   List<String> files)
                            throws DeployerException
        Performs the delete of the given files.
        Parameters:
        client - AWS S3 client
        files - list of files to delete
        Throws:
        DeployerException - if there is any error deleting the files