private void reconfigureHL7Applications(HL7DeviceExtension from) { hl7apps.keySet().retainAll(from.hl7apps.keySet()); for (HL7Application src : from.hl7apps.values()) { HL7Application hl7app = hl7apps.get(src.getApplicationName()); if (hl7app == null) addHL7Application(hl7app = new HL7Application(src.getApplicationName())); hl7app.reconfigure(src); } } }
private HL7Application loadHL7Application(SearchResult sr, String deviceDN, Device device) throws NamingException, ConfigurationException { Attributes attrs = sr.getAttributes(); HL7Application hl7app = new HL7Application(LdapUtils.stringValue(attrs.get("hl7ApplicationName"), null)); loadFrom(hl7app, attrs); for (String connDN : LdapUtils.stringArray(attrs.get("dicomNetworkConnectionReference"))) hl7app.addConnection(LdapUtils.findConnection(connDN, deviceDN, device)); for (LdapHL7ConfigurationExtension ext : extensions) ext.loadChilds(hl7app, sr.getNameInNamespace()); return hl7app; }
private void loadFrom(HL7DeviceExtension ext, JsonReader reader, Device device, ConfigurationDelegate config) throws ConfigurationException { List<Connection> conns = device.listConnections(); reader.next(); reader.expect(JsonParser.Event.START_ARRAY); while (reader.next() == JsonParser.Event.START_OBJECT) { HL7Application hl7App = new HL7Application(); loadFrom(hl7App, reader, device, conns, config); reader.expect(JsonParser.Event.END_OBJECT); ext.addHL7Application(hl7App); } reader.expect(JsonParser.Event.END_ARRAY); }
private void loadFrom(HL7DeviceExtension ext, JsonReader reader, Device device, ConfigurationDelegate config) throws ConfigurationException { List<Connection> conns = device.listConnections(); reader.next(); reader.expect(JsonParser.Event.START_ARRAY); while (reader.next() == JsonParser.Event.START_OBJECT) { HL7Application hl7App = new HL7Application(); loadFrom(hl7App, reader, device, conns, config); reader.expect(JsonParser.Event.END_OBJECT); ext.addHL7Application(hl7App); } reader.expect(JsonParser.Event.END_ARRAY); }