blob: 1a05c8c6b342b19ae1c0b2401acfcdc31e8c347e (
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 String.format("File(s) added: %s.", copyResult);
else
return "Backup failed.";
}
}
|