Class DefaultCommerceCategoryService
- java.lang.Object
-
- de.hybris.platform.commerceservices.category.impl.DefaultCommerceCategoryService
-
- All Implemented Interfaces:
CommerceCategoryService
public class DefaultCommerceCategoryService extends java.lang.Object implements CommerceCategoryService
A category service that lookup up a category by code, but only includes product catalogs.
-
-
Constructor Summary
Constructors Constructor Description DefaultCommerceCategoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CatalogVersionServicegetCatalogVersionService()protected java.lang.StringgetCatalogVersionsString()CategoryModelgetCategoryForCode(java.lang.String code)Retrieves theCategoryModelwith the specificcode.protected CategoryServicegetCategoryService()java.util.Collection<java.util.List<CategoryModel>>getPathsForCategory(CategoryModel category)Returns all paths for thisCategoryModel.protected java.util.Collection<java.util.List<CategoryModel>>getPathsInternal(CategoryModel category, java.util.Set<CategoryModel> controlSet)protected booleanisSupportedCategory(CategoryModel categoryModel)protected voidmarkNotVisited(CategoryModel cat, java.util.Set<CategoryModel> visitedCategories)protected booleannotVisited(CategoryModel cat, java.util.Set<CategoryModel> visitedCategories)voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetCategoryService(CategoryService categoryService)protected voidvisitSuperCategory(CategoryModel category, CategoryModel parent, java.util.Set<CategoryModel> controlSet, java.util.Collection<java.util.List<CategoryModel>> result)
-
-
-
Method Detail
-
getCategoryService
protected CategoryService getCategoryService()
-
setCategoryService
public void setCategoryService(CategoryService categoryService)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getCategoryForCode
public CategoryModel getCategoryForCode(java.lang.String code)
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
protected java.lang.String getCatalogVersionsString()
-
getPathsForCategory
public java.util.Collection<java.util.List<CategoryModel>> getPathsForCategory(CategoryModel category)
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 java.util.Collection<java.util.List<CategoryModel>> getPathsInternal(CategoryModel category, java.util.Set<CategoryModel> controlSet)
-
markNotVisited
protected void markNotVisited(CategoryModel cat, java.util.Set<CategoryModel> visitedCategories)
-
notVisited
protected boolean notVisited(CategoryModel cat, java.util.Set<CategoryModel> visitedCategories)
-
visitSuperCategory
protected void visitSuperCategory(CategoryModel category, CategoryModel parent, java.util.Set<CategoryModel> controlSet, java.util.Collection<java.util.List<CategoryModel>> result)
-
isSupportedCategory
protected boolean isSupportedCategory(CategoryModel categoryModel)
-
-