mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
31.45.2019 e24dcccdda9ae085534e0f16814486eb155aaa59
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package de.micromata.borgbutler.server;
 
public class BorgVersion {
    private String binariesDownloadVersion = "1.1.8";
    private String binariesDownloadUrl = "https://github.com/borgbackup/borg/releases/download/" + binariesDownloadVersion + "/";
    private String[][] borgBinaries = {
            {"freebsd64", "FreeBSD 64"},
            {"linux32", "Linux 32"},
            {"linux64", "Linux 64"},
            {"macosx64", "MacOS X 64"}};
 
    private String minimumRequiredBorgVersion = "1.1.8";
 
    /**
     * One of the values "macosx64", "linux64" etc. for using a binary provided by BorgButler or null / "manual" for
     * using a manual installed borg version.
     */
    private String borgBinary;
 
    private boolean versionOK = false;
    private String version;
    private String statusMessage;
 
    public BorgVersion copyFrom(BorgVersion other) {
        this.borgBinary = other.borgBinary;
        this.versionOK = other.versionOK;
        this.version = other.version;
        this.statusMessage = other.statusMessage;
        return this;
    }
 
    public String getBinariesDownloadVersion() {
        return this.binariesDownloadVersion;
    }
 
    public String getBinariesDownloadUrl() {
        return this.binariesDownloadUrl;
    }
 
    public String[][] getBorgBinaries() {
        return this.borgBinaries;
    }
 
    public String getMinimumRequiredBorgVersion() {
        return this.minimumRequiredBorgVersion;
    }
 
    public String getBorgBinary() {
        return this.borgBinary;
    }
 
    public boolean isVersionOK() {
        return this.versionOK;
    }
 
    public String getVersion() {
        return this.version;
    }
 
    public String getStatusMessage() {
        return this.statusMessage;
    }
 
    BorgVersion setBorgBinary(String borgBinary) {
        this.borgBinary = borgBinary;
        return this;
    }
 
    BorgVersion setVersionOK(boolean versionOK) {
        this.versionOK = versionOK;
        return this;
    }
 
    BorgVersion setVersion(String version) {
        this.version = version;
        return this;
    }
 
    BorgVersion setStatusMessage(String statusMessage) {
        this.statusMessage = statusMessage;
        return this;
    }
}