001package org.dcm4che3.conf.api.hl7; 002 003import org.dcm4che3.conf.api.extensions.ReconfiguringIterator; 004import org.dcm4che3.net.hl7.HL7ApplicationExtension; 005 006/** 007 * This class shall be extended by vendors/contributors to store extra configuration for an HL7 application. 008 * @author Roman K 009 */ 010public class CommonHL7AppExtension extends HL7ApplicationExtension{ 011 /** 012 * Iterates over all configurable fields and transfers the values using getter/setters from 'from' to this 013 * @param from The extension with new configuration 014 * @param clazz Class of the extension 015 */ 016 public void reconfigureReflectively(HL7ApplicationExtension from, Class<? extends HL7ApplicationExtension> clazz) { 017 ReconfiguringIterator.reconfigure(from, this, clazz); 018 } 019 020 public void reconfigure(HL7ApplicationExtension from) { 021 // fallback to default reflective if the extension did not override the method 022 reconfigureReflectively(from,from.getClass()); 023 } 024}