se.datadosen.jalbum
Class AlbumSynchronizer

java.lang.Object
  extended by se.datadosen.jalbum.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

Field Summary
static boolean debugMode
           
protected  AlbumBean engine
           
 
Constructor Summary
AlbumSynchronizer(AlbumBean engine)
           
 
Method Summary
 void delete(java.io.File file)
          Deletes the corresponding files in the album structure Pass File given from call to translate
 void deleteOriginal(AlbumObject ao)
           
 void moveTo(java.io.File from, java.io.File to)
          Moves the corresponding files in the album structure Pass Files given from calls to translate
 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

engine

protected AlbumBean engine

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(java.io.File from,
                   java.io.File to)
Moves the corresponding files in the album structure Pass Files given from calls to translate

See Also:
translate

delete

public void delete(java.io.File file)
Deletes the corresponding files in the album structure Pass File given from call to translate

See Also:
translate

deleteOriginal

public void deleteOriginal(AlbumObject ao)