@Singleton public class MarketPlaceServiceImpl extends Object implements MarketPlaceService
| Constructor and Description |
|---|
MarketPlaceServiceImpl() |
MarketPlaceServiceImpl(CategoryDAO daoDAO) |
| 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 id)
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 id,
boolean deleteChild)
Remove the category with given
categoryId,
and also its descendants if deleteChild is true. |
Category |
updateCategory(Category category)
Update the category.
|
public MarketPlaceServiceImpl()
public MarketPlaceServiceImpl(CategoryDAO daoDAO)
public Category createCategory(Category category)
MarketPlaceServicecategory model object.createCategory in interface MarketPlaceServicepublic Category createCategory(Category category, long parentId) throws MarketPlaceException
MarketPlaceServicecategory model object and parent category ID.createCategory in interface MarketPlaceServicecategory - the category metadata to create.parentId - parent Category IDMarketPlaceException - the category associated with parentId doesn't exist.public Category updateCategory(Category category)
MarketPlaceServiceupdateCategory in interface MarketPlaceServicepublic void removeCategory(long id,
boolean deleteChild)
throws MarketPlaceException
MarketPlaceServicecategoryId,
and also its descendants if deleteChild is true.removeCategory in interface MarketPlaceServiceMarketPlaceExceptionpublic Category getCategory(Long id) throws MarketPlaceException
MarketPlaceServicecategoryId.getCategory in interface MarketPlaceServiceMarketPlaceExceptionpublic org.exoplatform.commons.utils.ListAccess<Category> getSubCategory(long parentId)
MarketPlaceServiceparentId.getSubCategory in interface MarketPlaceServicepublic org.exoplatform.commons.utils.ListAccess<Category> findCategories(String query)
findCategories in interface MarketPlaceServicepublic long count()
MarketPlaceServicecount in interface MarketPlaceServicepublic List<Category> findAllCategories()
MarketPlaceServicefindAllCategories in interface MarketPlaceServicepublic Category findCategoryByName(String categoryName) throws MarketPlaceException
findCategoryByName in interface MarketPlaceServiceMarketPlaceExceptionCopyright © 2003–2017 eXo Platform SAS. All rights reserved.