Class S3FileServiceimpl

java.lang.Object
co.kuali.coeus.s3.impl.S3FileServiceimpl
All Implemented Interfaces:
S3FileService, org.springframework.beans.factory.DisposableBean

public class S3FileServiceimpl extends Object implements S3FileService, org.springframework.beans.factory.DisposableBean
  • Constructor Details

    • S3FileServiceimpl

      public S3FileServiceimpl()
  • Method Details

    • createFile

      public String createFile(S3File s3File)
      Description copied from interface: S3FileService
      Creates a file in S3 with server-side encryption.
      Specified by:
      createFile in interface S3FileService
      Parameters:
      s3File - the file to create. The file must be non null, have a non-null InputStream.
      Returns:
      the generated id for the file.
    • createRequestBody

      protected software.amazon.awssdk.core.sync.RequestBody createRequestBody(S3File file)
    • createObjectMetadata

      protected Map<String,String> createObjectMetadata(S3File file)
    • retrieveFile

      public S3File retrieveFile(String id)
      Description copied from interface: S3FileService
      Retrieves a file from S3.
      Specified by:
      retrieveFile in interface S3FileService
      Parameters:
      id - the id for the file. Cannot be blank.
      Returns:
      the file in S3. Any available metadata will from S3 will be included in the metadata. This metadata may differ from the metadata used to create the file. Will return null if the object does not exist.
    • updateFile

      public void updateFile(S3File s3File)
      Description copied from interface: S3FileService
      Updates a file in S3 with server-side encryption.
      Specified by:
      updateFile in interface S3FileService
      Parameters:
      s3File - the file to update. The file must be non null, have a non-null InputStream, and an existing id.
    • deleteFile

      public void deleteFile(String id)
      Description copied from interface: S3FileService
      Delete a file in S3.
      Specified by:
      deleteFile in interface S3FileService
      Parameters:
      id - the id for the file. Cannot be blank.
    • getBucketName

      public String getBucketName()
    • setBucketName

      public void setBucketName(String bucketName)
    • getReplicationBucketName

      public String getReplicationBucketName()
    • setReplicationBucketName

      public void setReplicationBucketName(String replicationBucketName)
    • getAmazonS3

      public software.amazon.awssdk.services.s3.S3Client getAmazonS3()
    • setAmazonS3

      public void setAmazonS3(software.amazon.awssdk.services.s3.S3Client amazonS3)
    • isEncryptionEnabled

      public boolean isEncryptionEnabled()
    • setEncryptionEnabled

      public void setEncryptionEnabled(boolean encryptionEnabled)
    • getEncryptionKey

      public String getEncryptionKey()
    • setEncryptionKey

      public void setEncryptionKey(String encryptionKey)
      Sets a master KMS key to be used to encrypt auto-provisioned S3 buckets
      Parameters:
      encryptionKey - - A master KMS key ID or ARN
    • getConfidentialDataTagName

      public String getConfidentialDataTagName()
    • setConfidentialDataTagName

      public void setConfidentialDataTagName(String confidentialDataTagName)
    • isConfidentialData

      public boolean isConfidentialData()
    • setConfidentialData

      public void setConfidentialData(boolean confidentialData)
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean