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
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.protected booleanprotected com.amazonaws.services.s3.AmazonS3static final Stringprotected Stringprotected Stringprotected Stringprotected 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 Stringstatic final Stringprotected Stringprotected Stringprotected com.amazonaws.services.securitytoken.AWSSecurityTokenServiceprotected booleanFields inherited from class org.nuxeo.ecm.automation.server.jaxrs.batch.handler.AbstractBatchHandler
BATCH_HANDLER_NAME, name, PROP_TRANSIENT_STORE_NAME, transientStoreName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.amazonaws.services.securitytoken.model.CredentialsassumeRole(com.amazonaws.services.securitytoken.model.AssumeRoleRequest request) booleancompleteUpload(String batchId, String fileIndex, BatchFileInfo fileInfo) Callback for the batch handler to execute post-upload actions.protected com.amazonaws.services.securitytoken.model.CredentialsgetAwsCredentials(String batchId) Attempts to fetch a batch with the given id.protected BlobProviderstatic StringgetCharset(String contentType) static StringgetMimeType(String contentType) protected com.amazonaws.services.s3.transfer.TransferManagerprotected voidinitialize(Map<String, String> properties) protected voidinitializeBuilder(com.amazonaws.client.builder.AwsClientBuilder<?, ?> builder, com.amazonaws.auth.AWSCredentialsProvider credentials) protected com.amazonaws.services.s3.AmazonS3initializeS3Client(com.amazonaws.auth.AWSCredentialsProvider credentials) protected com.amazonaws.services.securitytoken.AWSSecurityTokenServiceinitializeSTSClient(com.amazonaws.auth.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.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:
initializein 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: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 com.amazonaws.services.securitytoken.model.Credentials assumeRole(com.amazonaws.services.securitytoken.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 com.amazonaws.services.s3.transfer.TransferManager 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
-
S3BinaryManager.ACCELERATE_MODE_PROPERTY