public interface MarketPlaceService
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Return the total numbre of registered categories
|
Category |
createCategory(Category category)
Create a category with given
category model object. |
Category |
createCategory(Category category,
long parentId)
Create a sub-category with given
category model object and parent category ID. |
List<Category> |
findAllCategories()
Return all categories registered in the DB
|
org.exoplatform.commons.utils.ListAccess<Category> |
findCategories(String query) |
Category |
findCategoryByName(String categoryName) |
Category |
getCategory(Long categoryId)
Return the category with given
categoryId. |
org.exoplatform.commons.utils.ListAccess<Category> |
getSubCategory(long parentId)
Return a list of children of a parent category with given
parentId. |
void |
removeCategory(long categoryId,
boolean deleteChild)
Remove the category with given
categoryId,
and also its descendants if deleteChild is true. |
Category |
updateCategory(Category category)
Update the category.
|
Category createCategory(Category category)
category model object.category - Category createCategory(Category category, long parentId) throws MarketPlaceException
category model object and parent category ID.category - the category metadata to create.parentId - parent Category IDMarketPlaceException - the category associated with parentId doesn't exist.Category updateCategory(Category category)
category - void removeCategory(long categoryId,
boolean deleteChild)
throws MarketPlaceException
categoryId,
and also its descendants if deleteChild is true.categoryId - deleteChild - MarketPlaceExceptionCategory getCategory(Long categoryId) throws MarketPlaceException
categoryId.categoryId - MarketPlaceExceptionorg.exoplatform.commons.utils.ListAccess<Category> getSubCategory(long parentId)
parentId.parentId - long count()
List<Category> findAllCategories() throws MarketPlaceException
MarketPlaceExceptionCategory findCategoryByName(String categoryName) throws MarketPlaceException
categoryName - MarketPlaceExceptionCopyright © 2003–2017 eXo Platform SAS. All rights reserved.