code: private void categoryTreeToList(List<CmsCategoryBean> categoryList, List<CmsCategoryTreeEntry> entries) {
  
          if (entries == null) {
              return;
          }
          // skipping the root tree entry where the path property is empty
          for (CmsCategoryTreeEntry entry : entries) {
              CmsCategoryBean bean = new CmsCategoryBean(entry);
              categoryList.add(bean);
              categoryTreeToList(categoryList, entry.getChildren());
          }
      }
docs: Converts categories tree to a list of info beans.<p>
  
  @param categoryList the category list
  @param entries the tree entries