private void storeDiffs(Preferences prefs, HL7Application a, HL7Application b) {
    PreferencesUtils.storeDiffConnRefs(
        prefs,
        a.getConnections(),
        a.getDevice().listConnections(),
        b.getConnections(),
        b.getDevice().listConnections());
    PreferencesUtils.storeDiff(
        prefs,
        "hl7AcceptedSendingApplication",
        a.getAcceptedSendingApplications(),
        b.getAcceptedSendingApplications());
    PreferencesUtils.storeDiff(
        prefs, "hl7AcceptedMessageType", a.getAcceptedMessageTypes(), b.getAcceptedMessageTypes());
    PreferencesUtils.storeDiff(
        prefs,
        "hl7DefaultCharacterSet",
        a.getHL7DefaultCharacterSet(),
        b.getHL7DefaultCharacterSet());
    PreferencesUtils.storeDiff(prefs, "dicomInstalled", a.getInstalled(), b.getInstalled());

    for (PreferencesHL7ConfigurationExtension ext : extensions) ext.storeDiffs(a, b, prefs);
  }