docs: public void installBundles(final BundleContext bContext,
                                 final BundleList bundleList,
                                 final BundleInstallStatus installStatus,
                                 final int minStartLevel, final int defaultStartLevel,
                                 final int defaultInitialStartLevel,
                                 final WsLocationAdmin locSvc) {
  
          if (bundleList == null || bundleList.isEmpty())
              return;
          final FrameworkWiring fwkWiring = featureManager.bundleContext.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).adapt(FrameworkWiring.class);
          final File bootFile = getBootJar();
          bundleList.foreach(new BundleList.FeatureResourceHandler() {
              @Override
              @FFDCIgnore({ IllegalStateException.class, Exception.class })
              public boolean handle(FeatureResource fr) {
                  Bundle bundle = null;
                  WsResource resource = null;
                  String urlString = fr.getLocation();
  
                  try {
                      String bundleRepositoryType = fr.getBundleRepositoryType();
                      BundleRepositoryHolder bundleRepositoryHolder = featureManager.getBundleRepositoryHolder(bundleRepositoryType);
                      if (bundleRepositoryHolder == null) {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "Bundle repository not found for type=" + bundleRepositoryType);
                          }
                          Tr.error(tc, "UPDATE_MISSING_BUNDLE_ERROR", fr.getMatchString());
                          installStatus.addMissingBundle(fr);
                          return true;
                      }
                      // Get the product name for which the bundles are being installed.
                      String productName = bundleRepositoryHolder.getFeatureType();
  
                      if (libertyBoot) {
                          bundle = installLibertyBootBundle(productName, fr, fwkWiring);
                      } else {
                          bundle = installFeatureBundle(urlString, productName, bundleRepositoryHolder, fr);
                      }
                      if (bundle == null) {
                          return true;
                      }
  
                      BundleStartLevel bsl = bundle.adapt(BundleStartLevel.class);
                      BundleRevision bRev = bundle.adapt(BundleRevision.class);
  
                      int level = 0;
  
                      // For non-fragment bundles set the bundle startLevel then
                      // add to the list of bundles to be started.
                      // The order is important because the bundles are sorted by
                      // start level to preserve the start level ordering during
                      // dynamic feature additions.
                      if ((bRev.getTypes() & BundleRevision.TYPE_FRAGMENT) != BundleRevision.TYPE_FRAGMENT) {
  
                          level = bsl.getStartLevel();
  
                          // Set the start level on the bundle to the selected value
                          // if it hasn't been set before
                          if (level == defaultInitialStartLevel) {
                              int sl = fr.getStartLevel();
                              int newLevel = (sl == 0) ? defaultStartLevel : (sl < minStartLevel) ? minStartLevel : sl;
                              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                  Tr.debug(this, tc, "Changing the start level of bundle {0} from {1} to the current level of {2}", bundle, level, newLevel);
                              }
                              level = newLevel;
                              bsl.setStartLevel(level);
                          }
  
                          installStatus.addBundleToStart(bundle);
                      }
  
                      // need to get a resource for the bundle list createAssociation
                      // call, if we end up with a null resource then bad things
                      // happen, like we fail to uninstall bundles when we should
                      File bundleFile = getBundleFile(bundle);
                      resource = locSvc.asResource(bundleFile, bundleFile.isFile());
  
                      // Update bundle list with resolved information
                      bundleList.createAssociation(fr, bundle, resource, level);
                  } catch (IllegalStateException e) {
                      // The framework is stopping: this is an expected but not ideal occurrence.
                      installStatus.markContextInvalid(e);
                      return false;
                  } catch (Exception e) {
                      // We encountered an error installing a bundle, add it to
                      // the status, and continue. The caller will handle as appropriate
                      installStatus.addInstallException("INSTALL " + urlString + " (resolved from: " + fr + ")", e);
                  }
                  return true;
              }
  
              private File getBundleFile(Bundle bundle) {
                  if (libertyBoot) {
                      return bootFile;
                  }
                  // make sure we have a File for the bundle that is already
                  // installed. Get this by processing the location. We
                  // need to get past the reference:file: part of the URL.
                  String location = bundle.getLocation();
                  int index = location.indexOf(BUNDLE_LOC_REFERENCE_TAG);
                  location = location.substring(index + BUNDLE_LOC_REFERENCE_TAG.length());
                  // This file path is URL form, convert it back to a valid system File path
                  return new File(URI.create(location));
              }
  
              private Bundle installLibertyBootBundle(String productName, FeatureResource fr, FrameworkWiring fwkWiring) throws BundleException, IOException {
                  //getting the LibertyBootRuntime instance and installing the boot bundle
                  LibertyBootRuntime libertyBoot = featureManager.getLibertyBoot();
                  if (libertyBoot == null) {
                      throw new IllegalStateException("No LibertBootRuntime service available!");
                  }
  
                  Bundle bundle = libertyBoot.installBootBundle(fr.getSymbolicName(), fr.getVersionRange(), BUNDLE_LOC_FEATURE_TAG);
                  if (bundle == null) {
                      installStatus.addMissingBundle(fr);
                      return null;
                  }
  
                  Region productRegion = getProductRegion(productName);
                  Region current = featureManager.getDigraph().getRegion(bundle);
                  if (!productRegion.equals(current)) {
                      current.removeBundle(bundle);
                      productRegion.addBundle(bundle);
                  }
                  return bundle;
              }
  
              private Bundle installFeatureBundle(String urlString, String productName, BundleRepositoryHolder bundleRepositoryHolder,
                                                  FeatureResource fr) throws BundleException, IOException {
                  Bundle bundle = fetchInstalledBundle(urlString, productName);
                  if (bundle == null) {
                      ContentBasedLocalBundleRepository lbr = bundleRepositoryHolder.getBundleRepository();
                      // Try to find the file, hopefully using the cached path
                      File bundleFile = lbr.selectBundle(urlString, fr.getSymbolicName(), fr.getVersionRange());
  
                      if (bundleFile == null) {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "Bundle not matched", lbr, fr);
                          }
                          Tr.error(tc, "UPDATE_MISSING_BUNDLE_ERROR", fr.getMatchString());
                          installStatus.addMissingBundle(fr);
                          return null;
                      }
  
                      // Get URL from filename
                      URI uri = bundleFile.toURI();
                      urlString = uri.toURL().toString();
  
                      urlString = PathUtils.normalize(urlString);
  
                      // Install this bundle as a "reference"-- this means that the
                      // framework will not copy this bundle into it's private cache,
                      // it will run from the actual jar (wherever it is).
                      urlString = BUNDLE_LOC_REFERENCE_TAG + urlString;
  
                      // Get the bundle location.
                      // The location format being returned must match the format in SchemaBundle and BundleList.
                      String location = getBundleLocation(urlString, productName);
  
                      Region productRegion = getProductRegion(productName);
                      // Bundle will just be returned if something from this location exists already.
                      bundle = productRegion.installBundleAtLocation(location, new URL(urlString).openStream());
                  }
                  return bundle;
              }
  
              private Bundle fetchInstalledBundle(String urlString, String productName) {
                  // We install bundles as references so we need to ensure that we add reference: to the file url.
                  String location = getBundleLocation(BUNDLE_LOC_REFERENCE_TAG + urlString, productName);
                  Bundle b = featureManager.bundleContext.getBundle(location);
  
                  if (b != null && b.getState() == Bundle.UNINSTALLED) {
                      b = null;
                  }
  
                  return b;
              }
          });
      }