Class S3DirectBatchHandler

All Implemented Interfaces:
BatchHandler

public class S3DirectBatchHandler extends AbstractBatchHandler
Batch Handler allowing direct S3 upload.
Since:
10.1
  • Field Details

  • Constructor Details

    • S3DirectBatchHandler

      public S3DirectBatchHandler()
  • Method Details

    • getMimeType

      public static String getMimeType(String contentType)
      Since:
      11.5
    • getCharset

      public static String getCharset(String contentType)
      Since:
      11.5
    • initialize

      protected void initialize(Map<String,String> properties)
      Overrides:
      initialize in class AbstractBatchHandler
    • initializeSTSClient

      protected com.amazonaws.services.securitytoken.AWSSecurityTokenService initializeSTSClient(com.amazonaws.auth.AWSCredentialsProvider credentials)
    • initializeS3Client

      protected com.amazonaws.services.s3.AmazonS3 initializeS3Client(com.amazonaws.auth.AWSCredentialsProvider credentials)
    • initializeBuilder

      protected void initializeBuilder(com.amazonaws.client.builder.AwsClientBuilder<?,?> builder, com.amazonaws.auth.AWSCredentialsProvider credentials)
    • getBatch

      public Batch getBatch(String batchId)
      Description copied from interface: BatchHandler
      Attempts to fetch a batch with the given id.
      Parameters:
      batchId - the batch id to fetch
      Returns:
      the batch with the given id, or null if not found
    • assumeRole

      protected com.amazonaws.services.securitytoken.model.Credentials assumeRole(com.amazonaws.services.securitytoken.model.AssumeRoleRequest request)
    • completeUpload

      public boolean completeUpload(String batchId, String fileIndex, BatchFileInfo fileInfo)
      Description copied from interface: BatchHandler
      Callback for the batch handler to execute post-upload actions. This is only typically used in third-party batch handlers.
      Parameters:
      batchId - the batch id
      fileIndex - the file index within the batch
      fileInfo - file information regarting the uploaded file
      Returns:
      true if the action was success
    • move

      protected void move(String sourceKey, String destinationKey)
    • isValidDigest

      protected boolean isValidDigest(String key)
    • getBlobProvider

      protected BlobProvider getBlobProvider()
    • getTransferManager

      protected com.amazonaws.services.s3.transfer.TransferManager getTransferManager()
    • getAwsCredentials

      protected com.amazonaws.services.securitytoken.model.Credentials getAwsCredentials(String batchId)
    • refreshToken

      public Map<String,Object> refreshToken(String batchId)
      Description copied from interface: BatchHandler
      Attempts to renew the credentials associated to this batch handler. This is only typically used in third-party batch handlers.
      Parameters:
      batchId - the batch id
      Returns:
      the new credentials
      Since:
      11.1