예제 #1
0
  /**
   * Adds a collection of pluginIds for TdbAus that are different from those in this Tdb.
   *
   * @param pluginIds the set of pluginIds
   * @param otherTdb a Tdb
   */
  private void addPluginIdsForDifferences(Set<String> pluginIds, Tdb otherTdb) {
    Map<String, TdbPublisher> tdbPublishers = otherTdb.getAllTdbPublishers();

    for (TdbPublisher tdbPublisher : tdbPublishers.values()) {
      if (!this.tdbPublisherMap.containsKey(tdbPublisher.getName())) {
        // add pluginIds for publishers in tdb that are not in this Tdb
        tdbPublisher.addAllPluginIds(pluginIds);
      }
    }

    for (TdbPublisher thisPublisher : tdbPublisherMap.values()) {
      TdbPublisher tdbPublisher = tdbPublishers.get(thisPublisher.getName());
      if (tdbPublisher == null) {
        // add pluginIds for publisher in this Tdb that is not in tdb
        thisPublisher.addAllPluginIds(pluginIds);
      } else {
        // add pluginIds for publishers in both Tdbs that are different
        thisPublisher.addPluginIdsForDifferences(pluginIds, tdbPublisher);
      }
    }
  }