CategoryService
- In this article:
Introduction
Imcms has single interface support and different manipulation with categories for documents. We can easy, create/update/delete/get all categories over this bean CategoryService. Of course you can use old version category service with oldest API objects - you have to use CategoryMapper, more information about it CategoryMapper That be init new bean CategoryService and work with methods need to look at the code below:
Use API
CategoryService categoryService = Imcms.getServices().getManagedBean(CategoryService.class);
List<Category> getAll();
Optional<Category> getById(int id);
Category save(Category saveMe); //create new Category
Category update(Category updateMe);
void delete(int id);
List<CategoryJPA> getCategoriesByCategoryType(Integer id);
Description about Category
Category object has any fields:
Integer
id
- identifier category objectString
name
- name category objectString
description
- something description about categoryCategoryTypeDTO
type
- type category which relation current the category