001package org.hl7.fhir.r5.utils.xver;
002
003import lombok.Getter;
004import lombok.Setter;
005import org.hl7.fhir.exceptions.FHIRException;
006import org.hl7.fhir.r5.context.IWorkerContext;
007import org.hl7.fhir.utilities.MarkedToMoveToAdjunctPackage;
008
009@MarkedToMoveToAdjunctPackage
010public class XVerExtensionManagerFactory {
011
012  // this arrangement is temporary while working up the new cross-version package
013  // system. We need to figure out a better way to inject the loader logic.
014  //
015  // On the context?
016  @Getter @Setter
017  private static boolean newLoader = false;
018
019
020  public static XVerExtensionManager createExtensionManager(IWorkerContext context) throws FHIRException {
021    if (newLoader) {
022      return new XVerExtensionManagerNew(context);
023    } else {
024      return new XVerExtensionManagerOld(context);
025    }
026  }
027}