/** * @return all the aspects that define a classification. */ public List<QName> getAllClassificationAspects() { Collection<QName> aspects = services.getCategoryService().getClassificationAspects(); ArrayList<QName> answer = new ArrayList<QName>(aspects.size()); answer.addAll(aspects); return answer; }
/** * @return all the aspects that define a classification. */ public List<QName> getAllClassificationAspects() { Collection<QName> aspects = services.getCategoryService().getClassificationAspects(); ArrayList<QName> answer = new ArrayList<QName>(aspects.size()); answer.addAll(aspects); return answer; }
/** * Find all the category nodes in a given classification. * * @param aspect * * @return all the category nodes in a given classification. */ public List<CategoryTemplateNode> getAllCategoryNodes(QName aspect) { return buildCategoryNodes(services.getCategoryService().getCategories(storeRef, aspect, CategoryService.Depth.ANY)); }
/** * Remove this category */ public void removeCategory() { services.getCategoryService().deleteCategory(getNodeRef()); }
/** * Remove this category */ public void removeCategory() { services.getCategoryService().deleteCategory(getNodeRef()); }
/** * Find all the category nodes in a given classification. * * @param aspect * * @return all the category nodes in a given classification. */ public List<CategoryTemplateNode> getAllCategoryNodes(String aspect) { return buildCategoryNodes(services.getCategoryService().getCategories(storeRef, createQName(aspect), CategoryService.Depth.ANY)); }
/** * Create a new subcategory * * @param name Of the category to create * * @return CategoryNode */ public CategoryNode createSubCategory(String name) { return new CategoryNode(services.getCategoryService().createCategory(getNodeRef(), name), this.services, this.scope); }
/** * @return all the immediate member of a category */ public ScriptNode[] getImmediateCategoryMembers() { return buildNodes(services.getCategoryService().getChildren(getNodeRef(), CategoryService.Mode.MEMBERS, CategoryService.Depth.IMMEDIATE)); }
/** * Get the root categories in a classification. * * @param aspect * * @return List of TemplateNode */ public List<CategoryTemplateNode> getRootCategories(String aspect) { return buildCategoryNodes(services.getCategoryService().getRootCategories(storeRef, createQName(aspect))); }
/** * @return members and subcategories of a category */ public ScriptNode[] getMembersAndSubCategories() { return buildMixedNodes(services.getCategoryService().getChildren(getNodeRef(), CategoryService.Mode.ALL, CategoryService.Depth.ANY)); }
/** * @return immediate members and subcategories of a category */ public ScriptNode[] getImmediateMembersAndSubCategories() { return buildMixedNodes(services.getCategoryService().getChildren(getNodeRef(), CategoryService.Mode.ALL, CategoryService.Depth.IMMEDIATE)); }
/** * @return all the immediate subcategories of a category */ public CategoryNode[] getImmediateSubCategories() { return buildCategoryNodes(services.getCategoryService().getChildren(getNodeRef(), CategoryService.Mode.SUB_CATEGORIES, CategoryService.Depth.IMMEDIATE)); }
/** * Create a new subcategory * * @param name Of the category to create * * @return CategoryNode */ public CategoryNode createSubCategory(String name) { return new CategoryNode(services.getCategoryService().createCategory(getNodeRef(), name), this.services, this.scope); }
/** * Find all the category nodes in a given classification. * * @param aspect * * @return all the category nodes in a given classification. */ public List<CategoryTemplateNode> getAllCategoryNodes(String aspect) { return buildCategoryNodes(services.getCategoryService().getCategories(storeRef, createQName(aspect), CategoryService.Depth.ANY)); }
/** * @return all the subcategories of a category */ public CategoryNode[] getSubCategories() { return buildCategoryNodes(services.getCategoryService().getChildren(getNodeRef(), CategoryService.Mode.SUB_CATEGORIES, CategoryService.Depth.ANY)); }
/** * @return immediate members and subcategories of a category */ public ScriptNode[] getImmediateMembersAndSubCategories() { return buildMixedNodes(services.getCategoryService().getChildren(getNodeRef(), CategoryService.Mode.ALL, CategoryService.Depth.IMMEDIATE)); }
/** * Create a root category in a classification. * * @param aspect String * @param name String */ public CategoryNode createRootCategory(String aspect, String name) { NodeRef categoryNodeRef = services.getCategoryService().createRootCategory(storeRef, createQName(aspect), name); CategoryNode categoryNode = new CategoryNode(categoryNodeRef, this.services, getScope()); return categoryNode; }
/** * Create a root category in a classification. * * @param aspect String * @param name String */ public CategoryNode createRootCategory(String aspect, String name) { NodeRef categoryNodeRef = services.getCategoryService().createRootCategory(storeRef, createQName(aspect), name); CategoryNode categoryNode = new CategoryNode(categoryNodeRef, this.services, getScope()); return categoryNode; }
/** * Find all the category nodes in a given classification. * * @param aspect String * @return Scriptable */ public Scriptable getAllCategoryNodes(String aspect) { Object[] cats = buildCategoryNodes(services.getCategoryService().getCategories( storeRef, createQName(aspect), CategoryService.Depth.ANY)); return Context.getCurrentContext().newArray(getScope(), cats); }
/** * Get the root categories in a classification. * * @param aspect String * @return Scriptable */ public Scriptable getRootCategories(String aspect) { Object[] cats = buildCategoryNodes(services.getCategoryService().getRootCategories( storeRef, createQName(aspect))); return Context.getCurrentContext().newArray(getScope(), cats); }