diff options
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/data')
-rw-r--r-- | src/main/java/com/keuin/kbackupfabric/data/PendingOperation.java | 41 | ||||
-rw-r--r-- | src/main/java/com/keuin/kbackupfabric/data/PendingOperationType.java | 6 |
2 files changed, 0 insertions, 47 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/data/PendingOperation.java b/src/main/java/com/keuin/kbackupfabric/data/PendingOperation.java deleted file mode 100644 index 8f7490c..0000000 --- a/src/main/java/com/keuin/kbackupfabric/data/PendingOperation.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.keuin.kbackupfabric.data; - -public class PendingOperation { - private final PendingOperationType operationType; - private final String backupName; - - public PendingOperation(PendingOperationType operationType, String backupName) { - this.operationType = operationType; - this.backupName = backupName; - } - - public static PendingOperation deleteOperation(String backupName) { - return new PendingOperation(PendingOperationType.DELETE, backupName); - } - - public static PendingOperation restoreOperation(String backupName) { - return new PendingOperation(PendingOperationType.RESTORE_TO, backupName); - } - - public boolean isDelete() { - return operationType == PendingOperationType.DELETE; - } - - public boolean isRestore() { - return operationType == PendingOperationType.RESTORE_TO; - } - - public String getBackupName() { - return backupName; - } - - @Override - public String toString() { - String op = "operation"; - if (isDelete()) - op = "deletion"; - if (isRestore()) - op = "restoration"; - return String.format("%s on backup %s", op, getBackupName()); - } -} diff --git a/src/main/java/com/keuin/kbackupfabric/data/PendingOperationType.java b/src/main/java/com/keuin/kbackupfabric/data/PendingOperationType.java deleted file mode 100644 index f86fc0d..0000000 --- a/src/main/java/com/keuin/kbackupfabric/data/PendingOperationType.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.keuin.kbackupfabric.data; - -enum PendingOperationType { - RESTORE_TO, - DELETE -} |