Class AlbumSynchronizer


  • public class AlbumSynchronizer
    extends java.lang.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" behaviour of earlier jAlbum versions
    Since:
    8.0
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void delete​(java.io.File file)
      Deprecated.
      Use delete(AlbumObject).
      void delete​(AlbumObject ao)
      Deletes the corresponding files in the album structure
      void deleteOriginal​(AlbumObject ao)  
      void moveTo​(AlbumObject ao, java.io.File from, java.io.File to)
      Moves the corresponding files in the album structure
      java.io.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
      • Methods inherited from class java.lang.Object

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

      • debugMode

        public static boolean debugMode
    • Constructor Detail

      • AlbumSynchronizer

        public AlbumSynchronizer​(AlbumBean engine)
    • Method Detail

      • translate

        public java.io.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,
                           java.io.File from,
                           java.io.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​(java.io.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:
        translate(se.datadosen.jalbum.AlbumObject)
      • deleteOriginal

        public void deleteOriginal​(AlbumObject ao)