Class S3FileRef

java.lang.Object
org.frankframework.filesystem.S3FileRef

public class S3FileRef extends Object
Object to hold information about an object stored in Amazon S3. Since the S3 API uses different types of response objects the object here is to:
  • Allow keys to be prefixed with a bucket-name, separated by "|".
  • Ensure the correct filename (with extension) is used.
  • Ensures correct folder names, using UNIX path delimiters, ending with a "/".
  • The content-lenght as well as modification-time are stored.
  • Everything can be updated with a simple method to simplify code in implementations.
Author:
Niels Meijer
  • Field Details

  • Constructor Details

    • S3FileRef

      public S3FileRef(software.amazon.awssdk.services.s3.model.S3Object s3Object, String bucketName)
    • S3FileRef

      public S3FileRef(String key, String defaultBucketName)
    • S3FileRef

      public S3FileRef(String filename, String folderName, String bucketName)
  • Method Details

    • getKey

      public String getKey()
      Returns the canonical name inclusive file path when present
    • getName

      public String getName()
      Returns either the file or foldername (suffixed with a slash)
    • hasName

      public boolean hasName()
    • getUserMetadata

      @Nonnull public Map<String,String> getUserMetadata()
    • updateObject

      public void updateObject(software.amazon.awssdk.services.s3.model.GetObjectResponse obj)
    • updateObject

      public void updateObject(software.amazon.awssdk.services.s3.model.HeadObjectResponse hor)