@Override protected void mergeChilds(ConfigurationChanges diffs, Device prev, Device device, String deviceDN) throws NamingException { HL7DeviceExtension prevHL7Ext = prev.getDeviceExtension(HL7DeviceExtension.class); HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class); if (prevHL7Ext != null) for (String appName : prevHL7Ext.getHL7ApplicationNames()) { if (hl7Ext == null || !hl7Ext.containsHL7Application(appName)) { config.destroySubcontextWithChilds(hl7appDN(appName, deviceDN)); ConfigurationChanges.addModifiedObject(diffs, hl7appDN(appName, deviceDN), ConfigurationChanges.ChangeType.D); } } if (hl7Ext == null) return; for (HL7Application hl7app : hl7Ext.getHL7Applications()) { String appName = hl7app.getApplicationName(); if (prevHL7Ext == null || !prevHL7Ext.containsHL7Application(appName)) { store(diffs, hl7app, deviceDN); } else merge(diffs, prevHL7Ext.getHL7Application(appName), hl7app, deviceDN); } }