コード例 #1
0
  public void saveSelectedConfiguration(IConfigurationSaver saver) {

    saver.dispose();

    ProxyPresenter presenter = view.getProxyPresenter();
    String configurationName = saver.getChosenConfigurationName();
    setTitle(configurationName);
    presenter.saveCurrentProxySettings(configurationName);
    presenter.saveCurrentDecoratorSettings(configurationName);

    Logger.getLogger(this.getClass()).info("Updated configuration '" + configurationName + "'");
  }
コード例 #2
0
  public void saveNewConfiguration(IConfigurationSaver saver) {
    saver.dispose();

    ProxyPresenter presenter = view.getProxyPresenter();
    String configurationName = saver.getTypedName();

    setTitle(configurationName);

    if (configurationName == null || configurationName.trim().length() == 0) {

      Logger.getLogger(this.getClass()).info("Not creating a null configuration");

    } else {
      presenter.saveCurrentProxySettings(configurationName);
      presenter.saveCurrentDecoratorSettings(configurationName);

      Logger.getLogger(this.getClass()).info("Created configuration '" + configurationName + "'");
    }
  }