Package org.nuxeo.ecm.core.storage.sql
Class S3DirectBatchHandler
java.lang.Object
org.nuxeo.ecm.automation.server.jaxrs.batch.handler.AbstractBatchHandler
org.nuxeo.ecm.core.storage.sql.S3DirectBatchHandler
- All Implemented Interfaces:
BatchHandler
Batch Handler allowing direct S3 upload.
- Since:
- 10.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.protected boolean
protected com.amazonaws.services.s3.AmazonS3
static final String
protected String
protected String
protected String
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 String
static final String
protected String
protected String
protected com.amazonaws.services.securitytoken.AWSSecurityTokenService
protected boolean
Fields inherited from class org.nuxeo.ecm.automation.server.jaxrs.batch.handler.AbstractBatchHandler
BATCH_HANDLER_NAME, name, PROP_TRANSIENT_STORE_NAME, transientStoreName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.amazonaws.services.securitytoken.model.Credentials
assumeRole
(com.amazonaws.services.securitytoken.model.AssumeRoleRequest request) boolean
completeUpload
(String batchId, String fileIndex, BatchFileInfo fileInfo) Callback for the batch handler to execute post-upload actions.protected com.amazonaws.services.securitytoken.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 com.amazonaws.services.s3.transfer.TransferManager
protected void
initialize
(Map<String, String> properties) protected void
initializeBuilder
(com.amazonaws.client.builder.AwsClientBuilder<?, ?> builder, com.amazonaws.auth.AWSCredentialsProvider credentials) protected com.amazonaws.services.s3.AmazonS3
initializeS3Client
(com.amazonaws.auth.AWSCredentialsProvider credentials) protected com.amazonaws.services.securitytoken.AWSSecurityTokenService
initializeSTSClient
(com.amazonaws.auth.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.automation.server.jaxrs.batch.handler.AbstractBatchHandler
generateBatchId, getBatchParameters, getName, getTransientStore, initialize, newBatch
-
Field Details
-
ACCELERATE_MODE_ENABLED_PROPERTY
Deprecated.since 11.1, useS3BinaryManager.ACCELERATE_MODE_PROPERTY
- See Also:
-
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 com.amazonaws.services.securitytoken.AWSSecurityTokenService stsClient -
amazonS3
protected com.amazonaws.services.s3.AmazonS3 amazonS3 -
endpoint
-
pathStyleAccessEnabled
protected boolean pathStyleAccessEnabled -
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 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
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
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 com.amazonaws.services.s3.transfer.TransferManager 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
-
S3BinaryManager.ACCELERATE_MODE_PROPERTY