Class AbstractLifecycleHook
- java.lang.Object
-
- org.craftercms.deployer.impl.lifecycle.AbstractLifecycleHook
-
- All Implemented Interfaces:
TargetLifecycleHook,InitializableByConfigBean
- Direct Known Subclasses:
AbstractIndexAwareLifecycleHook,ClearS3BucketLifecycleHook,CreateCloudFormationLifecycleHook,DeleteCloudFormationLifecycleHook,DeleteLocalRepoFolderLifecycleHook,WaitTillCloudFormationStackUsableLifecycleHook
public abstract class AbstractLifecycleHook extends Object implements TargetLifecycleHook
Base implementation ofTargetLifecycleHook- Since:
- 3.1.8
- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_KEY_DISABLEDprotected booleandisabledprotected org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description AbstractLifecycleHook()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoExecute(Target target)protected abstract voiddoInit(org.apache.commons.configuration2.Configuration config)voidexecute(Target target)Execute the hook.voidinit(org.apache.commons.configuration2.Configuration config)Initializes the bean using the specified configuration.
-
-
-
Field Detail
-
CONFIG_KEY_DISABLED
public static final String CONFIG_KEY_DISABLED
- See Also:
- Constant Field Values
-
logger
protected org.slf4j.Logger logger
-
disabled
protected boolean disabled
-
-
Method Detail
-
init
public void init(org.apache.commons.configuration2.Configuration config) throws org.craftercms.commons.config.ConfigurationException, DeployerExceptionDescription copied from interface:InitializableByConfigBeanInitializes the bean using the specified configuration.- Specified by:
initin interfaceInitializableByConfigBean- Parameters:
config- the bean's configuration- Throws:
org.craftercms.commons.config.ConfigurationException- if there's configuration related exceptionDeployerException- if there's a general exception on init
-
doInit
protected abstract void doInit(org.apache.commons.configuration2.Configuration config) throws org.craftercms.commons.config.ConfigurationException, DeployerException- Throws:
org.craftercms.commons.config.ConfigurationExceptionDeployerException
-
execute
public void execute(Target target) throws DeployerException
Description copied from interface:TargetLifecycleHookExecute the hook.- Specified by:
executein interfaceTargetLifecycleHook- Parameters:
target- the target associated to the hook- Throws:
DeployerException- if there's an exception on execution
-
doExecute
protected abstract void doExecute(Target target) throws DeployerException
- Throws:
DeployerException
-
-