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

Kai Reinhard
31.45.2019 e24dcccdda9ae085534e0f16814486eb155aaa59
borgbutler-core/src/main/java/de/micromata/borgbutler/config/Configuration.java
@@ -3,9 +3,6 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import de.micromata.borgbutler.demo.DemoRepos;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -22,29 +19,22 @@
    private static final String RESTORE_DIRNAME = "restore";
    @JsonIgnore
    @Setter(AccessLevel.PACKAGE)
    private File workingDir;
    /**
     * The path of the borg command to use.
     */
    @Getter
    @Setter
    private String borgCommand;
    /**
     * Default is 100 MB (approximately).
     */
    @Getter
    private int maxArchiveContentCacheCapacityMb = 100;
    @Getter
    @Setter
    private boolean showDemoRepos = true;
    /**
     * Default is restore inside BorgButler's home dir (~/.borgbutler/restore).
     */
    @Getter
    @JsonProperty("restoreDir")
    private String restoreDirPath;
    @JsonIgnore
@@ -114,4 +104,35 @@
    List<BorgRepoConfig> getRepoConfigs() {
        return repoConfigs;
    }
    public String getBorgCommand() {
        return this.borgCommand;
    }
    public int getMaxArchiveContentCacheCapacityMb() {
        return this.maxArchiveContentCacheCapacityMb;
    }
    public boolean isShowDemoRepos() {
        return this.showDemoRepos;
    }
    public String getRestoreDirPath() {
        return this.restoreDirPath;
    }
    Configuration setWorkingDir(File workingDir) {
        this.workingDir = workingDir;
        return this;
    }
    public Configuration setBorgCommand(String borgCommand) {
        this.borgCommand = borgCommand;
        return this;
    }
    public Configuration setShowDemoRepos(boolean showDemoRepos) {
        this.showDemoRepos = showDemoRepos;
        return this;
    }
}