Category category = catalogService.findCategoryById(id);
if (category != null) {
ArrayList<CategoryAttributeWrapper> out = new ArrayList<CategoryAttributeWrapper>();
if (category.getCategoryAttributes() != null) {
for (CategoryAttribute attribute : category.getCategoryAttributes()) {
CategoryAttributeWrapper wrapper = (CategoryAttributeWrapper)context.getBean(CategoryAttributeWrapper.class.getName());
wrapper.wrapSummary(attribute, request);
out.add(wrapper);
}
}
return out;
}