Class FileDeleter


  • public class FileDeleter
    extends java.lang.Object
    Helper class which sorts through a number of file-based deletions before processing them.
    Since:
    5.1.0-m3
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDeleter​(ome.system.OmeroContext ctx, ome.io.nio.AbstractFileSystemService afs, com.google.common.collect.SetMultimap<java.lang.String,​java.lang.Long> deleteTargets)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getFailedFilesCount()  
      java.util.HashMap<java.lang.String,​long[]> getUndeletedFiles()  
      java.lang.String getWarning()  
      protected java.util.Set<java.lang.Long> load​(ome.services.delete.files.FileDeleter.Type fileType)
      Lookup the ids which are scheduled for deletion.
      void run()  
      • Methods inherited from class java.lang.Object

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

      • FileDeleter

        public FileDeleter​(ome.system.OmeroContext ctx,
                           ome.io.nio.AbstractFileSystemService afs,
                           com.google.common.collect.SetMultimap<java.lang.String,​java.lang.Long> deleteTargets)
    • Method Detail

      • run

        public void run()
      • load

        protected java.util.Set<java.lang.Long> load​(ome.services.delete.files.FileDeleter.Type fileType)
        Lookup the ids which are scheduled for deletion.
        Parameters:
        fileType - non-null
        Returns:
        the IDs for that file type
      • getUndeletedFiles

        public java.util.HashMap<java.lang.String,​long[]> getUndeletedFiles()
      • getFailedFilesCount

        public int getFailedFilesCount()
      • getWarning

        public java.lang.String getWarning()