protected void loadChilds(Device device, Preferences deviceNode)
throws BackingStoreException, ConfigurationException {
if (!deviceNode.nodeExists("hl7Application"))
return;
HL7DeviceExtension hl7Ext = new HL7DeviceExtension();
device.addDeviceExtension(hl7Ext);
List<Connection> devConns = device.listConnections();
Preferences appsNode = deviceNode.node("hl7Application");
for (String appName : appsNode.childrenNames()) {
Preferences appNode = appsNode.node(appName);
HL7Application hl7app = newHL7Application(appNode);
loadFrom(hl7app, appNode);
int n = appNode.getInt("dicomNetworkConnectionReference.#", 0);
for (int i = 0; i < n; i++) {
hl7app.addConnection(devConns.get(
appNode.getInt("dicomNetworkConnectionReference." + (i+1), 0) - 1));
}
hl7Ext.addHL7Application(hl7app);
}
}