Class DefaultCommerceCategoryService
java.lang.Object
de.hybris.platform.commerceservices.category.impl.DefaultCommerceCategoryService
- All Implemented Interfaces:
CommerceCategoryService
A category service that lookup up a category by code, but only includes product catalogs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CatalogVersionServiceprotected StringgetCategoryForCode(String code) Retrieves theCategoryModelwith the specificcode.protected CategoryServicegetPathsForCategory(CategoryModel category) Returns all paths for thisCategoryModel.protected Collection<List<CategoryModel>>getPathsInternal(CategoryModel category, Set<CategoryModel> controlSet) protected booleanisSupportedCategory(CategoryModel categoryModel) protected voidmarkNotVisited(CategoryModel cat, Set<CategoryModel> visitedCategories) protected booleannotVisited(CategoryModel cat, Set<CategoryModel> visitedCategories) voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetCategoryService(CategoryService categoryService) protected voidvisitSuperCategory(CategoryModel category, CategoryModel parent, Set<CategoryModel> controlSet, Collection<List<CategoryModel>> result)
-
Constructor Details
-
DefaultCommerceCategoryService
public DefaultCommerceCategoryService()
-
-
Method Details
-
getCategoryService
-
setCategoryService
-
getCatalogVersionService
-
setCatalogVersionService
-
getCategoryForCode
Description copied from interface:CommerceCategoryServiceRetrieves theCategoryModelwith the specificcode.- Specified by:
getCategoryForCodein interfaceCommerceCategoryService- Parameters:
code- the code of the to be foundCategoryModel- Returns:
- found
CategoryModel
-
getCatalogVersionsString
-
getPathsForCategory
Description copied from interface:CommerceCategoryServiceReturns all paths for thisCategoryModel. Each path is a list of all categories in the path from root to this category.- Specified by:
getPathsForCategoryin interfaceCommerceCategoryService- Parameters:
category- the (sub)CategoryModel- Returns:
- all paths for this
CategoryModel, or empty collection if this category has no super-categories.
-
getPathsInternal
protected Collection<List<CategoryModel>> getPathsInternal(CategoryModel category, Set<CategoryModel> controlSet) -
markNotVisited
-
notVisited
-
visitSuperCategory
protected void visitSuperCategory(CategoryModel category, CategoryModel parent, Set<CategoryModel> controlSet, Collection<List<CategoryModel>> result) -
isSupportedCategory
-