Class DefaultAsCategoryService
java.lang.Object
de.hybris.platform.adaptivesearch.services.impl.DefaultAsCategoryService
- All Implemented Interfaces:
AsCategoryService
Default implementation of
AsCategoryService.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCategoryPath(List<String> categoryCodes, List<CatalogVersionModel> catalogVersions, boolean recursive) Builds the category path.protected voidbuildCategoryPathHelper(Set<PK> visitedCategories, List<CategoryModel> categoryPath, CategoryModel category) voidClears the current category path in the session.getAllCategoriesForCatalogVersion(CatalogVersionModel catalogVersion) Returns all categories belonging to the specified catalog version.getAllCategoryRelationsForCatalogVersion(CatalogVersionModel catalogVersion) Returns all category relations belonging to the specified catalog version.Returns the current category path in the session.protected booleanisActiveCategory(CategoryModel category) protected booleanisMatchingCategory(CategoryModel category, List<CatalogVersionModel> catalogVersions) protected booleanisNonActiveCategory(CategoryModel category) protected booleanisSupportedCategory(CategoryModel categoryModel) protected CategoryModelresolveCategory(String categoryCode, List<CatalogVersionModel> catalogVersions) voidsetAsCategoryDao(AsCategoryDao asCategoryDao) voidsetCategoryService(CategoryService categoryService) voidsetCurrentCategoryPath(List<CategoryModel> categoryPath) Sets the current category path in the session.voidsetModelService(ModelService modelService) voidsetSessionService(SessionService sessionService)
-
Field Details
-
CURRENT_CATEGORY_PATH
- See Also:
-
-
Constructor Details
-
DefaultAsCategoryService
public DefaultAsCategoryService()
-
-
Method Details
-
setCurrentCategoryPath
Description copied from interface:AsCategoryServiceSets the current category path in the session.- Specified by:
setCurrentCategoryPathin interfaceAsCategoryService- Parameters:
categoryPath- - the category path
-
getCurrentCategoryPath
Description copied from interface:AsCategoryServiceReturns the current category path in the session. If there are no current category path, an emptyOptionalis returned.- Specified by:
getCurrentCategoryPathin interfaceAsCategoryService- Returns:
- the current category path
-
clearCurrentCategoryPath
public void clearCurrentCategoryPath()Description copied from interface:AsCategoryServiceClears the current category path in the session.- Specified by:
clearCurrentCategoryPathin interfaceAsCategoryService
-
buildCategoryPath
public List<CategoryModel> buildCategoryPath(List<String> categoryCodes, List<CatalogVersionModel> catalogVersions, boolean recursive) Description copied from interface:AsCategoryServiceBuilds the category path.- Specified by:
buildCategoryPathin interfaceAsCategoryService- Parameters:
categoryCodes- - the category codescatalogVersions- - the catalog versionsrecursive- -trueif the supercategories should be considered,falseotherwise- Returns:
- the category path
-
buildCategoryPathHelper
protected void buildCategoryPathHelper(Set<PK> visitedCategories, List<CategoryModel> categoryPath, CategoryModel category) -
resolveCategory
protected CategoryModel resolveCategory(String categoryCode, List<CatalogVersionModel> catalogVersions) -
isMatchingCategory
protected boolean isMatchingCategory(CategoryModel category, List<CatalogVersionModel> catalogVersions) -
isActiveCategory
-
isNonActiveCategory
-
isSupportedCategory
-
getAllCategoriesForCatalogVersion
Description copied from interface:AsCategoryServiceReturns all categories belonging to the specified catalog version.- Specified by:
getAllCategoriesForCatalogVersionin interfaceAsCategoryService- Parameters:
catalogVersion- the catalog version- Returns:
- all categories belonging to the specified catalog version
-
getAllCategoryRelationsForCatalogVersion
Description copied from interface:AsCategoryServiceReturns all category relations belonging to the specified catalog version.- Specified by:
getAllCategoryRelationsForCatalogVersionin interfaceAsCategoryService- Parameters:
catalogVersion- the catalog version- Returns:
- all category relations belonging to the specified catalog version
-
getModelService
-
setModelService
-
getSessionService
-
setSessionService
-
getCategoryService
-
setCategoryService
-
getAsCategoryDao
-
setAsCategoryDao
-