}
@Override
protected void mergeChilds(Device prev, Device device, String deviceDN)
throws NamingException {
ImageReaderExtension prevExt =
prev.getDeviceExtension(ImageReaderExtension.class);
ImageReaderExtension ext =
device.getDeviceExtension(ImageReaderExtension.class);
if (ext == null) {
if (prevExt != null)
config.destroySubcontextWithChilds(CN_IMAGE_READER_FACTORY + deviceDN);
return;
}
if (prevExt == null) {
store(deviceDN, ext.getImageReaderFactory());
return;
}
String imageReadersDN = CN_IMAGE_READER_FACTORY + deviceDN;
ImageReaderFactory factory = ext.getImageReaderFactory();
ImageReaderFactory prevFactory = prevExt.getImageReaderFactory();
for (Entry<String, ImageReaderParam> entry : prevFactory.getEntries()) {
String tsuid = entry.getKey();
if (factory.get(tsuid) == null)
config.destroySubcontext(dnOf(tsuid, imageReadersDN));