org.ibisph.resource
Interface FileBackup

All Known Implementing Classes:
BasicFileBackup, VersionedFileBackup

public interface FileBackup

File Backup method signatures needed for all file backup implementors.

Author:
Garth Braithwaite, STG

Method Summary
 boolean delete()
          Deletes the backup file.
 void finalize()
          Method needed to do any post backup cleanup.
 java.io.File getBackupFile()
          Performs the file backup.
 java.io.File getSourceFile()
          Provides access to the source file.
 java.io.File restore()
          Restores backed up source file to it's original state/name.
 

Method Detail

getSourceFile

java.io.File getSourceFile()
Provides access to the source file.

Returns:
Source file that was backed up.

getBackupFile

java.io.File getBackupFile()
Performs the file backup.

Returns:
Destination file that the source file will be backed up to.

restore

java.io.File restore()
Restores backed up source file to it's original state/name.

Returns:
Original source file that was backed up.

delete

boolean delete()
Deletes the backup file.

Returns:
true if backup file exists and was successfully deleted, otherwise false.

finalize

void finalize()
Method needed to do any post backup cleanup. This can include deleting backup files etc.