use of jmri.server.json.JSON.PANEL in project JMRI by JMRI.
the class JsonUtilHttpService method getPanels.
public JsonNode getPanels(Locale locale, String format) {
ArrayNode root = mapper.createArrayNode();
// list loaded Panels (ControlPanelEditor, PanelEditor, LayoutEditor, SwitchboardEditor)
// list ControlPanelEditors
Editor.getEditors(ControlPanelEditor.class).stream().map((editor) -> this.getPanel(locale, editor, format)).filter((panel) -> (panel != null)).forEach((panel) -> {
root.add(panel);
});
// list LayoutEditors and PanelEditors
Editor.getEditors(PanelEditor.class).stream().map((editor) -> this.getPanel(locale, editor, format)).filter((panel) -> (panel != null)).forEach((panel) -> {
root.add(panel);
});
// list SwitchboardEditors
Editor.getEditors(SwitchboardEditor.class).stream().map((editor) -> this.getPanel(locale, editor, format)).filter((panel) -> (panel != null)).forEach((panel) -> {
root.add(panel);
});
return root;
}
Aggregations