Product product = catalogService.findProductById(id);
if (product != null) {
ArrayList<ProductAttributeWrapper> out = new ArrayList<ProductAttributeWrapper>();
if (product.getProductAttributes() != null) {
for (Map.Entry<String, ProductAttribute> entry : product.getProductAttributes().entrySet()) {
ProductAttributeWrapper wrapper = (ProductAttributeWrapper)context.getBean(ProductAttributeWrapper.class.getName());
wrapper.wrapSummary(entry.getValue(), request);
out.add(wrapper);
}
}
return out;
}