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 boolean
protected software.amazon.awssdk.services.s3.S3Client
static final String
protected String
protected String
protected URI
protected int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected boolean
protected String
static final String
protected software.amazon.awssdk.regions.Region
static final String
protected String
protected String
protected software.amazon.awssdk.services.sts.StsClient
protected boolean
Fields 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.Credentials
assumeRole
(software.amazon.awssdk.services.sts.model.AssumeRoleRequest request) boolean
completeUpload
(String batchId, String fileIndex, BatchFileInfo fileInfo) Callback for the batch handler to execute post-upload actions.protected software.amazon.awssdk.services.sts.model.Credentials
getAwsCredentials
(String batchId) Attempts to fetch a batch with the given id.protected BlobProvider
static String
getCharset
(String contentType) static String
getMimeType
(String contentType) protected software.amazon.awssdk.transfer.s3.S3TransferManager
protected void
initialize
(Map<String, String> properties) protected software.amazon.awssdk.services.s3.S3Client
initializeS3Client
(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) protected software.amazon.awssdk.services.sts.StsClient
initializeSTSClient
(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) protected boolean
isValidDigest
(String key) protected void
refreshToken
(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:
initialize
in 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: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 software.amazon.awssdk.services.sts.model.Credentials assumeRole(software.amazon.awssdk.services.sts.model.AssumeRoleRequest request) -
completeUpload
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 idfileIndex
- the file index within the batchfileInfo
- file information regarting the uploaded file- Returns:
true
if the action was success
-
move
-
isValidDigest
-
getBlobProvider
-
getTransferManager
protected software.amazon.awssdk.transfer.s3.S3TransferManager getTransferManager() -
getAwsCredentials
-
refreshToken
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
-