Example #1
0
 /**
  * @param categoryType
  * @return an array of Categories, empty array if no one found.
  */
 public Category[] getCategoriesOfType(CategoryType categoryType) {
   CategoryMapper categoryMapper = contentManagementSystem.getInternal().getCategoryMapper();
   Set<CategoryDomainObject> categoriesOfType =
       categoryMapper.getCategoriesOfType(
           categoryType.getInternal(), internalDocument.getCategoryIds());
   CategoryDomainObject[] categories =
       categoriesOfType.toArray(new CategoryDomainObject[categoriesOfType.size()]);
   return getCategoryArrayFromCategoryDomainObjectArray(categories);
 }
Example #2
0
 /** @return An array of Categories, an empty if no one found. */
 public Category[] getCategories() {
   Set<CategoryDomainObject> categories =
       contentManagementSystem
           .getInternal()
           .getCategoryMapper()
           .getCategories(internalDocument.getCategoryIds());
   CategoryDomainObject[] categoryDomainObjects =
       categories.toArray(new CategoryDomainObject[categories.size()]);
   return getCategoryArrayFromCategoryDomainObjectArray(categoryDomainObjects);
 }