Package org.nuxeo.ecm.blob.s3
Class S3DirectBatchHandler
java.lang.Object
org.nuxeo.ecm.core.io.upload.batch.impl.AbstractBatchHandler
org.nuxeo.ecm.blob.s3.S3DirectBatchHandler
- All Implemented Interfaces:
BatchHandler
Batch Handler allowing direct S3 upload.
- Since:
- 10.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected software.amazon.awssdk.services.s3.S3Clientstatic final Stringprotected Stringprotected Stringprotected URIprotected intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected Stringstatic final Stringprotected software.amazon.awssdk.regions.Regionstatic final Stringprotected Stringprotected Stringprotected software.amazon.awssdk.services.sts.StsClientprotected booleanFields inherited from class org.nuxeo.ecm.core.io.upload.batch.impl.AbstractBatchHandler
BATCH_HANDLER_NAME, name, PROP_TRANSIENT_STORE_NAME, transientStoreName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected software.amazon.awssdk.services.sts.model.CredentialsassumeRole(software.amazon.awssdk.services.sts.model.AssumeRoleRequest request) booleancompleteUpload(String batchId, String fileIndex, BatchFileInfo fileInfo) Callback for the batch handler to execute post-upload actions.protected software.amazon.awssdk.services.sts.model.CredentialsgetAwsCredentials(String batchId) Attempts to fetch a batch with the given id.protected BlobProviderstatic StringgetCharset(String contentType) static StringgetMimeType(String contentType) protected software.amazon.awssdk.transfer.s3.S3TransferManagerprotected voidinitialize(Map<String, String> properties) protected software.amazon.awssdk.services.s3.S3ClientinitializeS3Client(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) protected software.amazon.awssdk.services.sts.StsClientinitializeSTSClient(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) protected booleanisValidDigest(String key) protected voidrefreshToken(String batchId) Attempts to renew the credentials associated to this batch handler.Methods inherited from class org.nuxeo.ecm.core.io.upload.batch.impl.AbstractBatchHandler
generateBatchId, getBatchParameters, getName, getTransientStore, initialize, newBatch
-
Field Details
-
POLICY_TEMPLATE_PROPERTY
- See Also:
-
ROLE_ARN_PROPERTY
- Since:
- 10.10
- See Also:
-
BLOB_PROVIDER_ID_PROPERTY
- Since:
- 11.1
- See Also:
-
INFO_AWS_SECRET_KEY_ID
- See Also:
-
INFO_AWS_SECRET_ACCESS_KEY
- See Also:
-
INFO_AWS_SESSION_TOKEN
- See Also:
-
INFO_BUCKET
- See Also:
-
INFO_BASE_KEY
- See Also:
-
INFO_EXPIRATION
- See Also:
-
INFO_AWS_ENDPOINT
- Since:
- 11.1
- See Also:
-
INFO_AWS_PATH_STYLE_ACCESS
- Since:
- 11.1
- See Also:
-
INFO_AWS_REGION
- See Also:
-
INFO_USE_S3_ACCELERATE
- See Also:
-
stsClient
protected software.amazon.awssdk.services.sts.StsClient stsClient -
amazonS3
protected software.amazon.awssdk.services.s3.S3Client amazonS3 -
endpointOverride
-
pathStyleAccessEnabled
protected boolean pathStyleAccessEnabled -
region
protected software.amazon.awssdk.regions.Region region -
bucket
-
bucketPrefix
-
accelerateModeEnabled
protected boolean accelerateModeEnabled -
expiration
protected int expiration -
policy
-
roleArn
-
useServerSideEncryption
protected boolean useServerSideEncryption -
serverSideKMSKeyID
-
blobProviderId
-
-
Constructor Details
-
S3DirectBatchHandler
public S3DirectBatchHandler()
-
-
Method Details
-
getMimeType
- Since:
- 11.5
-
getCharset
- Since:
- 11.5
-
initialize
- Overrides:
initializein classAbstractBatchHandler
-
initializeSTSClient
protected software.amazon.awssdk.services.sts.StsClient initializeSTSClient(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) -
initializeS3Client
protected software.amazon.awssdk.services.s3.S3Client initializeS3Client(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) -
getBatch
Description copied from interface:BatchHandlerAttempts to fetch a batch with the given id.- Parameters:
batchId- the batch id to fetch- Returns:
- the batch with the given id, or
nullif not found
-
assumeRole
protected software.amazon.awssdk.services.sts.model.Credentials assumeRole(software.amazon.awssdk.services.sts.model.AssumeRoleRequest request) -
completeUpload
Description copied from interface:BatchHandlerCallback for the batch handler to execute post-upload actions. This is only typically used in third-party batch handlers.- Parameters:
batchId- the batch idfileIndex- the file index within the batchfileInfo- file information regarting the uploaded file- Returns:
trueif the action was success
-
move
-
isValidDigest
-
getBlobProvider
-
getTransferManager
protected software.amazon.awssdk.transfer.s3.S3TransferManager getTransferManager() -
getAwsCredentials
-
refreshToken
Description copied from interface:BatchHandlerAttempts 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
-