private void createCategory(MCategory catModel) {
   Category category = commandService.getCategory(catModel.getElementId());
   if (!category.isDefined()) {
     category.define(
         localize(catModel.getName(), catModel), localize(catModel.getDescription(), catModel));
   }
 }
 protected MCategory findCategory(String id) {
   final List<MCategory> categories = application.getCategories();
   for (MCategory cat : categories) {
     if (id.equals(cat.getElementId())) {
       return cat;
     }
   }
   return null;
 }