blob: bdd6d886f8a8166d5b4a8c322f846d4f828de627 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package com.keuin.kbackupfabric.operation.backup.feedback;
import com.keuin.kbackupfabric.backup.incremental.manager.IncCopyResult;
import org.jetbrains.annotations.Nullable;
public class IncrementalBackupFeedback implements BackupFeedback {
private final boolean success;
private final IncCopyResult copyResult;
public IncrementalBackupFeedback(boolean success, @Nullable IncCopyResult copyResult) {
this.success = success;
this.copyResult = copyResult;
}
@Override
public boolean isSuccess() {
return success;
}
public IncCopyResult getCopyResult() {
return copyResult;
}
@Override
public String getFeedback() {
if (success && copyResult != null)
return copyResult.toString();
else
return "Backup failed.";
}
}
|