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

...
Kai Reinhard
14.56.2018 19732b785f222871a76f931213587b2c04cc1e10
borgbutler-core/src/main/java/de/micromata/borgbutler/json/borg/BorgRepository.java
@@ -1,10 +1,7 @@
package de.micromata.borgbutler.json.borg;
import com.fasterxml.jackson.annotation.JsonProperty;
import de.micromata.borgbutler.config.BorgRepoConfig;
import de.micromata.borgbutler.config.ConfigurationHandler;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
@@ -13,15 +10,6 @@
 */
public class BorgRepository implements Serializable {
    private static final long serialVersionUID = 1278802519434516280L;
    /**
     * A name describing this config. Only used for displaying purposes. This is automatically set with the name
     * of the repository configuration.
     *
     * @see BorgRepoConfig#getName()
     */
    @Getter
    @Setter
    String name;
    @Getter
    private String id;
    @Getter
@@ -29,20 +17,4 @@
    private String lastModified;
    @Getter
    private String location;
    /**
     * Sets also the name for this repository if available in the configuration.
     *
     * @param location
     * @return
     */
    public BorgRepository setLocation(String location) {
        this.location = location;
        // It's ugly but efficiently ;-)
        BorgRepoConfig repoConfig = ConfigurationHandler.getConfiguration().getRepoConfig(location);
        if (repoConfig != null) {
            this.name = repoConfig.getName();
        }
        return this;
    }
}