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 CatalogVersionService
getCatalogVersionService()
protected java.lang.String
getCatalogVersionsString()
CategoryModel
getCategoryForCode(java.lang.String code)
Retrieves theCategoryModel
with the specificcode
.protected CategoryService
getCategoryService()
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 boolean
isSupportedCategory(CategoryModel categoryModel)
protected void
markNotVisited(CategoryModel cat, java.util.Set<CategoryModel> visitedCategories)
protected boolean
notVisited(CategoryModel cat, java.util.Set<CategoryModel> visitedCategories)
void
setCatalogVersionService(CatalogVersionService catalogVersionService)
void
setCategoryService(CategoryService categoryService)
protected void
visitSuperCategory(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:CommerceCategoryService
Retrieves theCategoryModel
with the specificcode
.- Specified by:
getCategoryForCode
in 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:CommerceCategoryService
Returns all paths for thisCategoryModel
. Each path is a list of all categories in the path from root to this category.- Specified by:
getPathsForCategory
in 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)
-
-