From d9c2af035ac2edb68bc8b6a1f94b7c772c3509c8 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sun, 2 Aug 2020 18:31:50 +0800 Subject: Refactor & object tree impl. stage 1 --- .../operation/backup/BackupMethod.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java (limited to 'src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java') diff --git a/src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java b/src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java new file mode 100644 index 0000000..97c609d --- /dev/null +++ b/src/main/java/com/keuin/kbackupfabric/operation/backup/BackupMethod.java @@ -0,0 +1,22 @@ +package com.keuin.kbackupfabric.operation.backup; + +import com.keuin.kbackupfabric.util.backup.builder.BackupFileNameBuilder; +import com.keuin.kbackupfabric.util.backup.formatter.BackupFileNameFormatter; +import com.sun.istack.internal.NotNull; + +import java.io.IOException; + +public interface BackupMethod { + + /** + * Perform a backup with given method. The backup will be saved as the given name. + * Note: real file name is depended by the backup type. + * @param backupName the backup name. + */ + void backup(@NotNull String backupName, @NotNull String levelPath, @NotNull String backupSaveDirectory) throws IOException; + + BackupFileNameBuilder getBackupFileNameBuilder(); + + BackupFileNameFormatter getBackupFileNameFormatter(); + +} -- cgit v1.2.3