Class PublishedFileSet


  • public class PublishedFileSet
    extends Object
    Provides an overview about which files are currently available on S3.
    • Constructor Detail

      • PublishedFileSet

        public PublishedFileSet​(List<S3Object> s3Objects,
                                boolean isKeyFilePublishingAllowed)
        Creates a new PublishedFileSet for the given S3 objects with the help of the metadata provider. The metadata provider helps to determine whether files have been changed, and are requiring re-upload.
        Parameters:
        s3Objects - the list of s3 objects.
        isKeyFilePublishingAllowed - whether the system is currently configured to allow diagnosis key file updates on S3
    • Method Detail

      • shouldPublish

        public boolean shouldPublish​(LocalFile file)
        Checks whether the given file, which is subject for publishing, is already available on the S3. Will return true, when:
        • The S3 object key does NOT exist on S3.
        • The environment variable FORCE_UPDATE_KEYFILES is set to true.
        • The checksum of the existing S3 object differs to the hash of the given file.
        Parameters:
        file - the to-be-published file which should be checked
        Returns:
        true, if it doesn't exist or differs - false, if the file has been published already