in src/main/java/org/apache/sling/feature/extension/apiregions/launcher/LauncherProperties.java [83:106]
public static Properties getBundleIDtoFeaturesMap(Feature app) {
Map<ArtifactId, Set<ArtifactId>> map = new HashMap<>();
for (Artifact bundle : app.getBundles())
{
map.compute(bundle.getId(), (id, features) ->
{
if (features == null)
{
features = new HashSet<>();
}
features.addAll(Arrays.asList(bundle.getFeatureOrigins(app.getId())));
return features;
});
}
Properties result = new Properties();
for (Map.Entry<ArtifactId, Set<ArtifactId>> entry : map.entrySet()) {
result.setProperty(entry.getKey().toMvnId(), entry.getValue().stream().map(ArtifactId::toMvnId).collect(Collectors.joining(",")));
}
return result;
}