package be.iminds.ilabt.jfed.rspec.model.javafx_impl;

import be.iminds.ilabt.jfed.rspec.model.InstallService;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * User: twalcari
 * Date: 9/10/2014
 * Time: 14:32
 */
public class FXInstallService implements InstallService {

    private final StringProperty installPath = new SimpleStringProperty();
    private final StringProperty url = new SimpleStringProperty();

    public FXInstallService() {
    }

    public FXInstallService(String installPath, String url){
        this.installPath.setValue(installPath);
        this.url.setValue(url);
    }

    public FXInstallService(InstallService is){
        this(is.getInstallPath(), is.getUrl());
    }

    @Override
    public String getInstallPath() {
        return installPath.get();
    }

    public StringProperty installPathProperty() {
        return installPath;
    }

    @Override
    public void setInstallPath(String installPath) {
        this.installPath.set(installPath);
    }

    @Override
    public String getUrl() {
        return url.get();
    }

    public StringProperty urlProperty() {
        return url;
    }

    @Override
    public void setUrl(String url) {
        this.url.set(url);
    }
}
