gpt4 book ai didi

org.opennms.features.vaadin.dashboard.config.ui.WallboardProvider.save()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 19:41:05 28 4
gpt4 key购买 nike

本文整理了Java中org.opennms.features.vaadin.dashboard.config.ui.WallboardProvider.save()方法的一些代码示例,展示了WallboardProvider.save()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WallboardProvider.save()方法的具体详情如下:
包路径:org.opennms.features.vaadin.dashboard.config.ui.WallboardProvider
类名称:WallboardProvider
方法名:save

WallboardProvider.save介绍

[英]This method saves the data represented by this object to disk.
[中]此方法将此对象表示的数据保存到磁盘。

代码示例

代码示例来源:origin: OpenNMS/opennms

/**
 * This method adds a {@link Wallboard} to this provider.
 *
 * @param wallboard the {@link Wallboard} instance to be added
 */
public synchronized void addWallboard(Wallboard wallboard) {
  if (m_wallboards == null) {
    load();
  }
  m_wallboards.getWallboards().add(wallboard);
  save();
}

代码示例来源:origin: OpenNMS/opennms

/**
   * This method removes a {@link Wallboard} from this provider.
   *
   * @param wallboard the {@link Wallboard} instance to be removed
   */
  public synchronized void removeWallboard(Wallboard wallboard) {
    if (m_wallboards == null) {
      load();
    }
    m_wallboards.getWallboards().remove(wallboard);
    save();
  }
}

代码示例来源:origin: OpenNMS/opennms

public void swapDashletSpec(DashletSpec dashletSpec, int direction) {
  int index = m_wallboard.getDashletSpecs().indexOf(dashletSpec);
  if (index + direction >= 0 && index + direction < m_wallboard.getDashletSpecs().size()) {
    Collections.swap(m_wallboard.getDashletSpecs(), index, index + direction);
    updateDashletSpecs();
    WallboardProvider.getInstance().save();
  }
}

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    for (Map.Entry<String, String> entry : requiredParameters.entrySet()) {
      String newValue = table.getItem(entry.getKey()).getItemProperty("Value").getValue().toString();
      dashletSpec.getParameters().put(entry.getKey(), newValue);
    }
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

/**
 * This method removes the given {@link DashletSpecEditor}.
 *
 * @param dashletSpecEditor the {@link DashletSpecEditor} to be removed
 */
public void removeDashletSpecEditor(DashletSpecEditor dashletSpecEditor) {
  m_verticalLayout.removeComponent(dashletSpecEditor);
  m_dashletSpecEditorMap.remove(dashletSpecEditor.getDashletSpec());
  m_wallboard.getDashletSpecs().remove(dashletSpecEditor.getDashletSpec());
  WallboardProvider.getInstance().save();
}

代码示例来源:origin: OpenNMS/opennms

/**
   * This method adds a given {@link DashletSpec}.
   *
   * @param dashletSpec the {@link DashletSpec} to be added
   */
  private void addDashletSpec(DashletSpec dashletSpec) {
    DashletSpecEditor dashletSpecEditor = new DashletSpecEditor(this, m_dashletSelector, dashletSpec);

    m_dashletSpecEditorMap.put(dashletSpec, dashletSpecEditor);

    m_verticalLayout.addComponent(dashletSpecEditor);

    if (!m_wallboard.getDashletSpecs().contains(dashletSpec)) {
      m_wallboard.getDashletSpecs().add(dashletSpec);

      WallboardProvider.getInstance().save();
    }
  }
}

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_dashletSpec.getParameters().put("criteria", criteriaBuilderComponent.getCriteria());
    m_dashletSpec.getParameters().put("boostSeverity", String.valueOf(m_boostedSeveritySelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    Map<Integer, String> reportsMap = kscPerformanceReportFactory.getReportList();
    m_dashletSpec.getParameters().put("kscReport", reportsMap.get(m_kscSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_dashletSpec.getParameters().put("maximizeWidth", (m_maximizeWidth.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("maximizeHeight", (m_maximizeHeight.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("chart", String.valueOf(m_chartSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: org.opennms.features.vaadin-dashlets/dashlet-charts

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_dashletSpec.getParameters().put("maximizeWidth", (m_maximizeWidth.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("maximizeHeight", (m_maximizeHeight.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("chart", String.valueOf(m_chartSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: org.opennms.features.vaadin-dashlets/dashlet-ksc

@Override
  public void buttonClick(Button.ClickEvent event) {
    Map<Integer, String> reportsMap = kscPerformanceReportFactory.getReportList();
    m_dashletSpec.getParameters().put("kscReport", reportsMap.get(m_kscSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (durationField.isValid()) {
      m_dashletSpec.setDuration(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Duration");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (boostDurationField.isValid()) {
      m_dashletSpec.setBoostDuration(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Duration");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (priorityField.isValid()) {
      m_dashletSpec.setPriority(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Priority");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (boostPriorityField.isValid()) {
      m_dashletSpec.setBoostPriority(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Priority");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    m_dashletSpec.setTitle((String) valueChangeEvent.getProperty().getValue());
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Title");
  }
});

代码示例来源:origin: OpenNMS/opennms

WallboardProvider.getInstance().save();
((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");

代码示例来源:origin: org.opennms.features.vaadin-dashlets/dashlet-rrd

WallboardProvider.getInstance().save();
((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (m_savingDisabled) {
      return;
    }
    if (valueChangeEvent.getProperty().getValue() == null) {
      m_dashletSpec.setDashletName("Undefined");
    } else {
      m_dashletSpec.setDashletName(valueChangeEvent.getProperty().getValue().toString());
      m_dashletSelect.removeItem("Undefined");
    }
    m_dashletSpec.getParameters().clear();
    Map<String, String> requiredParameters = m_dashletSelector.getDashletFactoryForName(m_dashletSpec.getDashletName()).getRequiredParameters();
    for (Map.Entry<String, String> entry : requiredParameters.entrySet()) {
      m_dashletSpec.getParameters().put(entry.getKey(), entry.getValue());
    }
    m_propertiesButton.setEnabled(requiredParameters.size() > 0);
    boolean boostable = m_dashletSelector.getDashletFactoryForName(m_dashletSpec.getDashletName()).isBoostable();
    boostPriorityField.setEnabled(boostable);
    boostDurationField.setEnabled(boostable);
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Dashlet");
  }
});

代码示例来源:origin: OpenNMS/opennms

public void textChange(FieldEvents.TextChangeEvent textChangeEvent) {
    AbstractTextField source = (AbstractTextField) textChangeEvent.getSource();
    source.setValue(textChangeEvent.getText());
    if (source.isValid()) {
      m_tab.setCaption(textChangeEvent.getText());
      m_wallboard.setTitle(textChangeEvent.getText());
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Title");
    }
  }
});

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com