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
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 inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
alwaysRun, env, excludeFiles, includeFiles, JUMPING_TO_PARAM_NAME, jumpTo, label, name, siteName, targetId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendDeployment
(org.apache.commons.csv.CSVPrinter printer, Deployment deployment) protected void
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 modeMethods 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 Details
-
HEADERS
-
outputFolder
-
-
Constructor Details
-
FileOutputProcessor
public FileOutputProcessor()
-
-
Method Details
-
setOutputFolder
Sets the output folder where the deployments results will be written to. -
doInit
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()Description copied from class:AbstractDeploymentProcessor
Allows extending classes perform any custom cleanup- Specified by:
doDestroy
in classAbstractDeploymentProcessor
-
supportsMode
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
-
appendDeployment
protected void appendDeployment(org.apache.commons.csv.CSVPrinter printer, Deployment deployment) throws IOException - Throws:
IOException
-
getOutputFile
-