public void addExtensions(String id, Version version, Collection<String> features) {
    DefaultCoreExtension coreExtension =
        new DefaultCoreExtension(null, null, new ExtensionId(id, version), "unknown");

    if (features != null) {
      coreExtension.setFeatures(features);
    }

    this.extensions.put(id, coreExtension);

    for (String feature : coreExtension.getFeatures()) {
      this.extensions.put(feature, coreExtension);
    }
  }
 public void addExtensions(DefaultCoreExtension extension) {
   this.extensions.put(extension.getId().getId(), extension);
 }