in src/main/java/org/apache/sling/feature/apiregions/impl/RegionPrinter.java [57:73]
private void renderBundleMappings(PrintWriter pw) {
Map<String, List<String>> featureRegions = config.getFeatureRegionMap();
Map<String, Set<String>> bundlesToFeatures = config.getBundleFeatureMap();
Map<String, Entry<String, Version>> bundleLocations = config.getBundleLocationConfigMap();
bundlesToFeatures.keySet().stream().sorted().forEach(bundle -> {
Set<String> regions = new HashSet<>();
bundlesToFeatures.get(bundle).stream()
.forEach(feature -> Optional.ofNullable(featureRegions.get(feature))
.ifPresent(regions::addAll));
String location = Optional.ofNullable(bundleLocations.get(bundle))
.map(loc -> loc.getKey() + "v" + loc.getValue().toString()).orElse("null");
pw.println(String.format(" - %s\n\t - features: %s\n\t - regions: %s\n\t - location: %s", bundle,
bundlesToFeatures.get(bundle).stream().collect(Collectors.joining(",")),
regions.stream().collect(Collectors.joining(",")), location));
});
}