Class DeleteFileTasklet

  • All Implemented Interfaces:
    org.springframework.batch.core.step.tasklet.Tasklet

    public class DeleteFileTasklet
    extends java.lang.Object
    implements org.springframework.batch.core.step.tasklet.Tasklet
    Deletes the given file. Exits silently if the file does not exist.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.batch.repeat.RepeatStatus execute​(org.springframework.batch.core.StepContribution contribution, org.springframework.batch.core.scope.context.ChunkContext chunkContext)  
      void setResource​(org.springframework.core.io.Resource resource)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeleteFileTasklet

        public DeleteFileTasklet()
    • Method Detail

      • execute

        public org.springframework.batch.repeat.RepeatStatus execute​(org.springframework.batch.core.StepContribution contribution,
                                                                     org.springframework.batch.core.scope.context.ChunkContext chunkContext)
                                                              throws java.lang.Exception
        Specified by:
        execute in interface org.springframework.batch.core.step.tasklet.Tasklet
        Throws:
        java.lang.Exception
      • setResource

        public void setResource​(org.springframework.core.io.Resource resource)
        Parameters:
        resource - The file to delete.