code: public List<CmsCategory> readCategories(
          CmsObject cms,
          String parentCategoryPath,
          boolean includeSubCats,
          String referencePath)
      throws CmsException {
  
          List<String> repositories = getCategoryRepositories(cms, referencePath);
          return readCategoriesForRepositories(cms, parentCategoryPath, includeSubCats, repositories, false);
      }
docs: Returns all categories given some search parameters.<p>
  
  @param cms the current cms context
  @param parentCategoryPath the path of the parent category to get the categories for
  @param includeSubCats if to include all categories, or first level child categories only
  @param referencePath the reference path to find all the category repositories
  
  @return a list of {@link CmsCategory} objects
  
  @throws CmsException if something goes wrong