Class FileArchivatorInsertLater

java.lang.Object
sk.iway.iwcm.components.file_archiv.FileArchivatorInsertLater

public class FileArchivatorInsertLater extends Object
Publishes file archive uploads that were scheduled for a future date. The job claims each waiting record atomically, moves its staged file into the archive, updates version history, and sends the configured notification.
  • Constructor Details

    • FileArchivatorInsertLater

      public FileArchivatorInsertLater()
  • Method Details

    • main

      public static void main(String[] args)
      Runs the scheduled-upload publisher on an administrative cluster node.
      Parameters:
      args - command-line arguments; not used
    • renameFile

      public static String renameFile(FileArchivatorBean scheduledBean)
      Claims and publishes a scheduled archive upload using the configured repository.
      Parameters:
      scheduledBean - waiting archive record whose staged file should be published
      Returns:
      the published file name, or null when the record could not be claimed or published
    • removeEmptyDirs

      public static boolean removeEmptyDirs(String startDir, String stopDir)
      Removes the empty directory chain from a starting directory up to the configured boundary.
      Parameters:
      startDir - first directory considered for removal
      stopDir - boundary directory that must not be traversed past
      Returns:
      true when no deletion is needed or the empty directory tree is removed