| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | 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; |
| | | } |
| | | } |