public abstract class AbstractS3Processor extends AbstractMainDeploymentProcessor
AbstractMainDeploymentProcessor for processors that use AWS S3.
Can be configured with the following YAML properties:
| Modifier and Type | Field and Description |
|---|---|
protected AwsClientBuilderConfigurer |
builderConfigurer
Helper class the configures credentials and other properties for a
AmazonS3 client. |
protected static String |
CONFIG_KEY_URL |
protected static String |
DELIMITER |
protected org.slf4j.Logger |
logger |
protected static String |
MACRO_SITENAME |
protected com.amazonaws.services.s3.AmazonS3URI |
s3Url
AWS S3 bucket URL
|
protected org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor |
threadPoolTaskExecutor
Thread pool to use for
TransferManager instances |
FAIL_DEPLOYMENT_CONFIG_KEY, failDeploymentOnFailurealwaysRun, env, excludeFiles, includeFiles, initialized, JUMPING_TO_PARAM_NAME, jumpTo, label, name, siteName, targetId| Constructor and Description |
|---|
AbstractS3Processor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor threadPoolTaskExecutor) |
| Modifier and Type | Method and Description |
|---|---|
protected com.amazonaws.services.s3.AmazonS3 |
buildClient()
Builds the
AmazonS3 client. |
protected com.amazonaws.services.s3.transfer.TransferManager |
buildTransferManager(com.amazonaws.services.s3.AmazonS3 client)
Builds the
TransferManager using the shared ExecutorService |
protected void |
doDestroy()
Allows extending classes perform any custom cleanup
|
protected void |
doInit(org.apache.commons.configuration2.Configuration config)
Allows extending classes perform any custom initialization
|
protected String |
getS3BaseKey()
Returns the base key from the S3 URL, making sure to replace the
{siteName} macro instances |
protected String |
getS3Key(String file)
Builds the AWS S3 key for the given file
|
doExecute, doMainProcess, failDeploymentOnProcessorFailure, init, shouldExecutedestroy, execute, getFilteredChangeSet, isJumpToActive, isPostDeployment, setBeanName, setEnv, setSiteName, setTargetId, shouldIncludeFile, startJumpToprotected static final String CONFIG_KEY_URL
protected static final String MACRO_SITENAME
protected static final String DELIMITER
protected org.slf4j.Logger logger
protected AwsClientBuilderConfigurer builderConfigurer
AmazonS3 client.protected com.amazonaws.services.s3.AmazonS3URI s3Url
protected org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor threadPoolTaskExecutor
TransferManager instancespublic AbstractS3Processor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor threadPoolTaskExecutor)
protected void doInit(org.apache.commons.configuration2.Configuration config)
throws org.craftercms.commons.config.ConfigurationException
doInit in class AbstractDeploymentProcessorconfig - the bean's configurationorg.craftercms.commons.config.ConfigurationException - if there's configuration related exceptionprotected String getS3BaseKey()
{siteName} macro instancesprotected String getS3Key(String file)
file - relative path of the fileprotected com.amazonaws.services.s3.AmazonS3 buildClient()
AmazonS3 client.protected com.amazonaws.services.s3.transfer.TransferManager buildTransferManager(com.amazonaws.services.s3.AmazonS3 client)
TransferManager using the shared ExecutorServiceprotected void doDestroy()
throws DeployerException
doDestroy in class AbstractDeploymentProcessorDeployerException - if an error occursCopyright © 2023. All rights reserved.