Files
alfresco-ng2-components/docs/content-services/services/category.service.md
MichalKinas 52520bb61e [ACS-4364] Move tree component and categories service to ADF (#8156)
* [ACS-4364] Add tree component and categories service

* [ACS-4364] Add tree component to public api

* [ACS-4364] Refine tree unit tests

* [ACS-4364] Intergrate adding and deleting category

* [ACS-4364] Restyle load more button in tree component

* [ACS-4364] Missing semicolon

* [ACS-4364] Fix code styling

* [ACS-4364] Add docs for tree component and category service

* [ACS-4364] CR fixes

* [ACS-4364] Hide header row when displayName is not provided

* [ACS-4364] Docs fixes

* [ACS-4364] Add helper methods, code cleanup, unit tests for new methods

* [ACS-4364] Add missing semicolon
2023-02-01 15:42:40 +01:00

3.6 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Category service v6.0.0.0 Active 2023-01-25

Category service

Manages categories in Content Services.

Class members

Methods

  • getSubcategories(parentCategoryId: string, skipCount?: number, maxItems?: number): Observable<CategoryPaging>
    Gets subcategories of a given parent category.
    • parentCategoryId: string - Identifier of a parent category
    • skipCount: number - Number of top categories to skip
    • maxItems: number - Maximum number of subcategories returned from Observable
    • Returns Observable<CategoryPaging> - CategoryPaging object (defined in JS-API) with category paging list
  • createSubcategory(parentCategoryId: string, payload: CategoryBody): Observable<CategoryEntry>
    Creates subcategory under category with provided categoryId.
    • parentCategoryId: string - Identifier of a parent category
    • payload: CategoryBody - Created category body
    • Returns Observable<CategoryEntry> - CategoryEntry object (defined in JS-API) containing the category
  • updateCategory(categoryId: string, payload: CategoryBody): Observable<CategoryEntry>
    Updates category.
    • categoryId: string - Identifier of a category
    • payload: CategoryBody - Created category body
    • Returns Observable<CategoryEntry> - CategoryEntry object (defined in JS-API) containing the category
  • deleteCategory(categoryId: string): Observable<void>
    Deletes category.
    • categoryId: string - Identifier of a category
    • Returns Observable<void> - Null object when the operation completes

Details

See the Categories API in the Alfresco JS API for more information about the types returned by Category service methods and for the implementation of the REST API the service is based on.