List<FeatureDescriptor> list =
new ArrayList<FeatureDescriptor>(beans.size());
// iterate over the list of managed beans
for (Map.Entry<String,BeanBuilder> bean : beans.entrySet()) {
String beanName = bean.getKey();
BeanBuilder builder = bean.getValue();
String loc = Util.getLocaleFromContextOrSystem(facesContext).toString();
Map<String,String> descriptions = builder.getDescriptions();
String description = null;
if (descriptions != null) {
description = descriptions.get(loc);
if (description == null) {
description = descriptions.get("DEFAULT");
}
}
list.add(Util.getFeatureDescriptor(beanName,
beanName,
(description == null) ? "" : description,
false,
false,
true,
builder.getBeanClass(),
Boolean.TRUE));
}
return list.iterator();
}