Interface BlogCategoryService
-
- All Known Implementing Classes:
BlogCategoryServiceImpl
public interface BlogCategoryService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlogCategoryaddChildCategory(java.lang.String parentId, java.lang.String childId)This method does add child entity in parent entity.java.util.Optional<BlogCategory>createCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> categoryAsMap)This method creates a database entity.BlogCategoryRepositorygetRepository()java.util.List<BlogCategory>rebuildAllCategories(java.util.ArrayList<java.lang.Object> allCategories)This method rebuilds a list of database entities.voidremoveCategoriesByIds(java.util.ArrayList<java.lang.String> categoriesIds)This method removes a list of database entities.voidremoveCategoryFromTranslation(java.lang.String categoryId, java.lang.String translationId)This method removes relationship between database entities.voidremoveCategoryWithDescendants(java.lang.String itemId)This method removes database entity with child database entity.voidremoveContainerFromBlogCategory(java.lang.String containerId, java.lang.String categoryId)This method removes relationship between database entities.java.util.List<BlogCategory>searchCategories(java.lang.String query, java.lang.String from, java.lang.String to)This method does search requests and returns data as list.BlogCategoryupdateCategory(BlogCategory category)This method updates of database entity.BlogCategoryupdateCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> categoryAsMap)This method updates of database entity.
-
-
-
Method Detail
-
getRepository
BlogCategoryRepository getRepository()
-
searchCategories
java.util.List<BlogCategory> searchCategories(java.lang.String query, java.lang.String from, java.lang.String to)
This method does search requests and returns data as list.- Parameters:
query- search queryfrom- field which filter and returned itemsto- field which filter and returned items- Returns:
- database entities as list
-
createCategory
java.util.Optional<BlogCategory> createCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> categoryAsMap)
This method creates a database entity.- Parameters:
categoryAsMap- map-representation of database entity- Returns:
- optional value to externally interaction
-
addChildCategory
BlogCategory addChildCategory(java.lang.String parentId, java.lang.String childId)
This method does add child entity in parent entity.- Parameters:
parentId- identification for database entity which will be updatedchildId- identification for database entity which will be added in parent database entity- Returns:
- database entity
-
updateCategory
BlogCategory updateCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> categoryAsMap)
This method updates of database entity.- Parameters:
categoryAsMap- map-representation of database entity- Returns:
- updated instance of database entity
-
updateCategory
BlogCategory updateCategory(BlogCategory category)
This method updates of database entity.- Parameters:
category- database entity which will be updated- Returns:
- updated instance of database entity
-
removeCategoryFromTranslation
void removeCategoryFromTranslation(java.lang.String categoryId, java.lang.String translationId)This method removes relationship between database entities.- Parameters:
categoryId- identification for database entity which will be removedtranslationId- identification for database entity which will be updated
-
removeCategoryWithDescendants
void removeCategoryWithDescendants(java.lang.String itemId)
This method removes database entity with child database entity.- Parameters:
itemId- identification for child database entity which will be removed and whose parent entity will be removed
-
removeCategoriesByIds
void removeCategoriesByIds(java.util.ArrayList<java.lang.String> categoriesIds)
This method removes a list of database entities.- Parameters:
categoriesIds- the list of database entities which will be removed
-
rebuildAllCategories
java.util.List<BlogCategory> rebuildAllCategories(java.util.ArrayList<java.lang.Object> allCategories)
This method rebuilds a list of database entities.- Parameters:
allCategories- the list of database entities which will be removed and updated- Returns:
- list of blog categories
-
removeContainerFromBlogCategory
void removeContainerFromBlogCategory(java.lang.String containerId, java.lang.String categoryId)This method removes relationship between database entities.- Parameters:
containerId- identification for database entity which will be removedcategoryId- identification for database entity which will be updated
-
-