se.datadosen.jalbum
Class AlbumSynchronizer
java.lang.Object
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
|
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 |
engine
protected AlbumBean engine
debugMode
public static boolean debugMode
AlbumSynchronizer
public AlbumSynchronizer(AlbumBean engine)
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)