@Override
	public ExitStatus afterStep(StepExecution stepExecution) {
		if (!deleteFiles) {
			return stepExecution.getExitStatus();
		}

		if (stepExecution.getStatus().equals(BatchStatus.STOPPED) || stepExecution.getStatus().isUnsuccessful()) {
			logger.warn("Job is stopped, or failed to complete successfully. File deletion will be skipped");
			return stepExecution.getExitStatus();
		}

		if (resources != null) {
			deleteResources();
		}
		else {
			deleteFilePath(stepExecution.getJobExecution().getJobParameters().getString(
					ExpandedJobParametersConverter.ABSOLUTE_FILE_PATH));
		}
		return stepExecution.getExitStatus();
	}
Step listener which can be used to delete files once they have been successfully processed by XD.

Can be used in one of two different ways:

<ol>
    <li>If the 'resources' property is set, it will try to delete each resource as a file.</li>
    <li>Otherwise, it will try to locate the 'absoluteFilePath' parameter in the job parameters
    	   and delete this file if it exists.</li>
</ol>

@author Luke Taylor
@author Michael Minella
@author Gary Russell
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/plugins/job/support/listener/FileDeletionStepExecutionListener.java