bean.setDescr(resDescrToAdd);
bean.setMainGroup(mainGroup);
bean.setResourceType(resourceType);
bean.setMimeType("image/jpeg");
List<Category> categories = new ArrayList<Category>();
ICategoryManager catManager =
(ICategoryManager) this.getService(SystemConstants.CATEGORY_MANAGER);
Category cat = catManager.getCategory(categoryCodeToAdd);
categories.add(cat);
bean.setCategories(categories);
return bean;
}