private List<ModificationItem> storeDiffs( AttributeFilter prev, AttributeFilter filter, List<ModificationItem> mods) { storeDiffTags(mods, "dcmTag", prev.getSelection(), filter.getSelection()); storeDiff( mods, "dcmCustomAttribute1", prev.getCustomAttribute1(), filter.getCustomAttribute1()); storeDiff( mods, "dcmCustomAttribute2", prev.getCustomAttribute2(), filter.getCustomAttribute2()); storeDiff( mods, "dcmCustomAttribute3", prev.getCustomAttribute3(), filter.getCustomAttribute3()); return mods; }
private static Attributes storeTo(AttributeFilter filter, Entity entity, BasicAttributes attrs) { attrs.put("objectclass", "dcmAttributeFilter"); attrs.put("dcmEntity", entity.name()); attrs.put(tagsAttr("dcmTag", filter.getSelection())); storeNotNull(attrs, "dcmCustomAttribute1", filter.getCustomAttribute1()); storeNotNull(attrs, "dcmCustomAttribute2", filter.getCustomAttribute2()); storeNotNull(attrs, "dcmCustomAttribute3", filter.getCustomAttribute3()); return attrs; }