Search in sources :

Example 1 with PANEL

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;
}
Also used : ControlPanelEditor(jmri.jmrit.display.controlPanelEditor.ControlPanelEditor) Arrays(java.util.Arrays) Enumeration(java.util.Enumeration) ConnectionConfig(jmri.jmrix.ConnectionConfig) URL(jmri.server.json.JSON.URL) ProfileManager(jmri.profile.ProfileManager) DccLocoAddress(jmri.DccLocoAddress) JmriJFrame(jmri.util.JmriJFrame) PANEL(jmri.server.json.JSON.PANEL) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) Editor(jmri.jmrit.display.Editor) JsonException(jmri.server.json.JsonException) SWITCHBOARD_PANEL(jmri.server.json.JSON.SWITCHBOARD_PANEL) ArrayList(java.util.ArrayList) TYPE(jmri.server.json.JSON.TYPE) JsonServerPreferences(jmri.jmris.json.JsonServerPreferences) ConnectionConfigManager(jmri.jmrix.ConnectionConfigManager) Locale(java.util.Locale) Profile(jmri.profile.Profile) SwitchboardEditor(jmri.jmrit.display.switchboardEditor.SwitchboardEditor) PanelEditor(jmri.jmrit.display.panelEditor.PanelEditor) JsonNode(com.fasterxml.jackson.databind.JsonNode) NAME(jmri.server.json.JSON.NAME) InstanceManager(jmri.InstanceManager) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) HttpServletResponse(javax.servlet.http.HttpServletResponse) JsonHttpService(jmri.server.json.JsonHttpService) Metadata(jmri.Metadata) LayoutEditor(jmri.jmrit.display.layoutEditor.LayoutEditor) ArrayNode(com.fasterxml.jackson.databind.node.ArrayNode) WebServerPreferences(jmri.web.server.WebServerPreferences) SystemConnectionMemo(jmri.jmrix.SystemConnectionMemo) CONTROL_PANEL(jmri.server.json.JSON.CONTROL_PANEL) ConnectionNameFromSystemName(jmri.util.ConnectionNameFromSystemName) DATA(jmri.server.json.JSON.DATA) USERNAME(jmri.server.json.JSON.USERNAME) JSON(jmri.server.json.JSON) NodeIdentity(jmri.util.node.NodeIdentity) ZeroConfService(jmri.util.zeroconf.ZeroConfService) LAYOUT_PANEL(jmri.server.json.JSON.LAYOUT_PANEL) ArrayNode(com.fasterxml.jackson.databind.node.ArrayNode)

Aggregations

JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Enumeration (java.util.Enumeration)1 Locale (java.util.Locale)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 DccLocoAddress (jmri.DccLocoAddress)1 InstanceManager (jmri.InstanceManager)1 Metadata (jmri.Metadata)1 JsonServerPreferences (jmri.jmris.json.JsonServerPreferences)1 Editor (jmri.jmrit.display.Editor)1 ControlPanelEditor (jmri.jmrit.display.controlPanelEditor.ControlPanelEditor)1 LayoutEditor (jmri.jmrit.display.layoutEditor.LayoutEditor)1 PanelEditor (jmri.jmrit.display.panelEditor.PanelEditor)1 SwitchboardEditor (jmri.jmrit.display.switchboardEditor.SwitchboardEditor)1 ConnectionConfig (jmri.jmrix.ConnectionConfig)1 ConnectionConfigManager (jmri.jmrix.ConnectionConfigManager)1