Class AlbumSynchronizer

java.lang.Object
se.datadosen.jalbum.AlbumSynchronizer

public class AlbumSynchronizer extends Object
Keeps generated files that corresponds to an AlbumObject in sync (corresponding name/location or deleted status). This class is supposed to provide a safer way of getting rid of waste files than the previously so criticised "clean files" behavior of earlier jAlbum versions
Since:
8.0
  • Field Details

    • engine

      protected AlbumBean engine
    • debugMode

      public static boolean debugMode
  • Constructor Details

    • AlbumSynchronizer

      public AlbumSynchronizer(AlbumBean engine)
  • Method Details

    • translate

      public File translate(AlbumObject ao)
      Translate AlbumObject to corresponding theoretical file in output directory For renames/moves, call before and after renaming/moving albumobject and pass resulting Files to moveTo method
    • moveTo

      public void moveTo(AlbumObject ao, File from, File to)
      Moves the corresponding files in the album structure
    • delete

      public void delete(AlbumObject ao)
      Deletes the corresponding files in the album structure
    • delete

      @Deprecated public void delete(File file)
      Deprecated.
      Use delete(AlbumObject). Used by online jAlbum
      Deletes the corresponding files in the album structure Pass File given from call to translate
      See Also:
    • deleteOriginal

      public void deleteOriginal(AlbumObject ao)
    • getAudioClipFile

      public File getAudioClipFile(AlbumObject ao, File translatedFile)