Class ClearS3BucketLifecycleHook
- java.lang.Object
-
- org.craftercms.deployer.impl.lifecycle.AbstractLifecycleHook
-
- org.craftercms.deployer.impl.lifecycle.aws.ClearS3BucketLifecycleHook
-
- All Implemented Interfaces:
TargetLifecycleHook
,InitializableByConfigBean
public class ClearS3BucketLifecycleHook extends AbstractLifecycleHook
TargetLifecycleHook
that clears an S3 bucket. Mostly used in preparation for deleting a bucket (most APIs don't allow deleting a non-empty bucket).- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description protected String
bucketName
protected AwsClientBuilderConfigurer
builderConfigurer
protected static String
CONFIG_KEY_BUCKET_NAME
-
Fields inherited from class org.craftercms.deployer.impl.lifecycle.AbstractLifecycleHook
CONFIG_KEY_DISABLED, disabled, logger
-
-
Constructor Summary
Constructors Constructor Description ClearS3BucketLifecycleHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.amazonaws.services.s3.AmazonS3
buildClient()
void
doExecute(Target target)
void
doInit(org.apache.commons.configuration2.Configuration config)
-
Methods inherited from class org.craftercms.deployer.impl.lifecycle.AbstractLifecycleHook
execute, init
-
-
-
-
Field Detail
-
CONFIG_KEY_BUCKET_NAME
protected static final String CONFIG_KEY_BUCKET_NAME
- See Also:
- Constant Field Values
-
builderConfigurer
protected AwsClientBuilderConfigurer builderConfigurer
-
bucketName
protected String bucketName
-
-
Method Detail
-
doInit
public void doInit(org.apache.commons.configuration2.Configuration config) throws org.craftercms.commons.config.ConfigurationException
- Specified by:
doInit
in classAbstractLifecycleHook
- Throws:
org.craftercms.commons.config.ConfigurationException
-
doExecute
public void doExecute(Target target) throws DeployerException
- Specified by:
doExecute
in classAbstractLifecycleHook
- Throws:
DeployerException
-
buildClient
protected com.amazonaws.services.s3.AmazonS3 buildClient()
-
-