protected List<List<UpgradeInfo>> getUpgradeInfosList(
      String bundleSymbolicName, ServiceTrackerMap<String, List<UpgradeInfo>> serviceTrackerMap) {

    String schemaVersionString = getSchemaVersionString(bundleSymbolicName);

    ReleaseGraphManager releaseGraphManager =
        new ReleaseGraphManager(serviceTrackerMap.getService(bundleSymbolicName));

    return releaseGraphManager.getUpgradeInfosList(schemaVersionString);
  }
  public void execute(String bundleSymbolicName, String toVersionString) {
    String schemaVersionString = getSchemaVersionString(bundleSymbolicName);

    ReleaseGraphManager releaseGraphManager =
        new ReleaseGraphManager(_serviceTrackerMap.getService(bundleSymbolicName));

    executeUpgradeInfos(
        bundleSymbolicName,
        releaseGraphManager.getUpgradeInfos(schemaVersionString, toVersionString));
  }
  public void check() {
    Set<String> bundleSymbolicNames = _serviceTrackerMap.keySet();

    for (String bundleSymbolicName : bundleSymbolicNames) {
      String schemaVersionString = getSchemaVersionString(bundleSymbolicName);

      ReleaseGraphManager releaseGraphManager =
          new ReleaseGraphManager(_serviceTrackerMap.getService(bundleSymbolicName));

      List<List<UpgradeInfo>> upgradeInfosList =
          releaseGraphManager.getUpgradeInfosList(schemaVersionString);

      int size = upgradeInfosList.size();

      if (size > 1) {
        System.out.println("There are " + size + " possible end nodes for " + schemaVersionString);
      }

      if (size == 0) {
        continue;
      }

      StringBundler sb = new StringBundler(6);

      sb.append("There is an upgrade process available for ");
      sb.append(bundleSymbolicName);
      sb.append(" from ");
      sb.append(schemaVersionString);
      sb.append(" to ");

      List<UpgradeInfo> upgradeInfos = upgradeInfosList.get(0);

      UpgradeInfo lastUpgradeInfo = upgradeInfos.get(upgradeInfos.size() - 1);

      sb.append(lastUpgradeInfo.getToSchemaVersionString());

      System.out.println(sb.toString());
    }
  }