@Override protected void storeChilds(String deviceDN, Device device) throws NamingException { super.storeChilds(deviceDN, device); if (!(device instanceof ArchiveDevice)) return; ArchiveDevice arcDev = (ArchiveDevice) device; for (Entity entity : Entity.values()) createSubcontext( dnOf("dcmEntity", entity.toString(), deviceDN), storeTo(arcDev.getAttributeFilter(entity), entity, new BasicAttributes(true))); }
@Override protected void mergeChilds(Device prev, Device device, String deviceDN) throws NamingException { super.mergeChilds(prev, device, deviceDN); if (!(prev instanceof ArchiveDevice && device instanceof ArchiveDevice)) return; ArchiveDevice aa = (ArchiveDevice) prev; ArchiveDevice bb = (ArchiveDevice) device; for (Entity entity : Entity.values()) modifyAttributes( dnOf("dcmEntity", entity.toString(), deviceDN), storeDiffs( aa.getAttributeFilter(entity), bb.getAttributeFilter(entity), new ArrayList<ModificationItem>())); }