Class FileOutputProcessor
- java.lang.Object
-
- org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
-
- org.craftercms.deployer.impl.processors.AbstractPostDeploymentProcessor
-
- org.craftercms.deployer.impl.processors.FileOutputProcessor
-
- All Implemented Interfaces:
DeploymentProcessor
,InitializableByConfigBean
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
public class FileOutputProcessor extends AbstractPostDeploymentProcessor
Post processor that writes the deployment result to an output file for later access, whenever a deployment fails or files where processed.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description protected static String[]
HEADERS
protected static String
OUTPUT_FILE_PARAM_NAME
protected File
outputFolder
-
Fields inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
alwaysRun, env, excludeFiles, includeFiles, JUMPING_TO_PARAM_NAME, jumpTo, label, name, siteName, targetId
-
-
Constructor Summary
Constructors Constructor Description FileOutputProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doDestroy()
Allows extending classes perform any custom cleanupvoid
doInit(org.apache.commons.configuration2.Configuration config)
Allows extending classes perform any custom initializationprotected ChangeSet
doPostProcess(Deployment deployment, ChangeSet filteredChangeSet, ChangeSet originalChangeSet)
protected File
getOutputFile(Deployment deployment)
void
setOutputFolder(File outputFolder)
Sets the output folder where the deployments results will be written to.boolean
supportsMode(Deployment.Mode mode)
Indicates if the processor should be included in the given deployment mode-
Methods inherited from class org.craftercms.deployer.impl.processors.AbstractPostDeploymentProcessor
doExecute, isPostDeployment, shouldExecute
-
Methods inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
destroy, execute, getFilteredChangeSet, init, isJumpToActive, setBeanName, setEnv, setSiteName, setTargetId, shouldIncludeFile, startJumpTo
-
-
-
-
Field Detail
-
OUTPUT_FILE_PARAM_NAME
protected static final String OUTPUT_FILE_PARAM_NAME
- See Also:
- Constant Field Values
-
HEADERS
protected static final String[] HEADERS
-
outputFolder
protected File outputFolder
-
-
Method Detail
-
setOutputFolder
public void setOutputFolder(File outputFolder)
Sets the output folder where the deployments results will be written to.
-
doInit
public void doInit(org.apache.commons.configuration2.Configuration config) throws DeployerException
Description copied from class:AbstractDeploymentProcessor
Allows extending classes perform any custom initialization- Specified by:
doInit
in classAbstractDeploymentProcessor
- Parameters:
config
- the bean's configuration- Throws:
DeployerException
- if there's a general exception on init
-
doDestroy
protected void doDestroy() throws DeployerException
Description copied from class:AbstractDeploymentProcessor
Allows extending classes perform any custom cleanup- Specified by:
doDestroy
in classAbstractDeploymentProcessor
- Throws:
DeployerException
- if an error occurs
-
supportsMode
public boolean supportsMode(Deployment.Mode mode)
Description copied from interface:DeploymentProcessor
Indicates if the processor should be included in the given deployment mode- Specified by:
supportsMode
in interfaceDeploymentProcessor
- Overrides:
supportsMode
in classAbstractDeploymentProcessor
- Parameters:
mode
- the deployment mode to check- Returns:
- true if the processor should be included
-
doPostProcess
protected ChangeSet doPostProcess(Deployment deployment, ChangeSet filteredChangeSet, ChangeSet originalChangeSet) throws DeployerException
- Specified by:
doPostProcess
in classAbstractPostDeploymentProcessor
- Throws:
DeployerException
-
getOutputFile
protected File getOutputFile(Deployment deployment)
-
-