use of org.apache.felix.webconsole.bundleinfo.BundleInfoProvider in project felix by apache.
the class BundlesServlet method bundleInfoDetails.
private final void bundleInfoDetails(List<Map<String, Object>> props, Bundle bundle, String appRoot, final Locale locale) {
final Map<String, Object> val = new LinkedHashMap<String, Object>();
val.put("key", "nfo");
final Map<String, Object[]> value = new LinkedHashMap<String, Object[]>();
final Object[] bundleInfoProviders = bundleInfoTracker.getServices();
for (int i = 0; bundleInfoProviders != null && i < bundleInfoProviders.length; i++) {
final BundleInfoProvider infoProvider = (BundleInfoProvider) bundleInfoProviders[i];
final BundleInfo[] infos = infoProvider.getBundleInfo(bundle, appRoot, locale);
if (null != infos && infos.length > 0) {
final Object[] infoArray = new Object[infos.length];
for (int j = 0; j < infos.length; j++) {
infoArray[j] = bundleInfo(infos[j]);
}
value.put(infoProvider.getName(locale), infoArray);
}
}
val.put("value", value);
props.add(val);
}
Aggregations