Class DefaultCategorySource
- java.lang.Object
-
- de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.DefaultCategorySource
-
- All Implemented Interfaces:
CategorySource
- Direct Known Subclasses:
MarketplaceCategorySource,VariantCategorySource
public class DefaultCategorySource extends java.lang.Object implements CategorySource
Source of categories for CategoryCodeValueProvider. Does not include ClassificationClasses by default. Optional root category is used to restrict categories found to categories that have a path to the root.
-
-
Constructor Summary
Constructors Constructor Description DefaultCategorySource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringcatalogVersionsToString(java.util.Collection<CatalogVersionModel> catalogVersions)protected java.lang.StringcatalogVersionToString(CatalogVersionModel catalogVersion)protected java.util.Set<CategoryModel>collectSuperCategories(CategoryModel category, java.util.Set<CategoryModel> rootCategories, java.util.Set<CategoryModel> path)protected java.util.Collection<CategoryModel>getAllCategories(CategoryModel directCategory, java.util.Set<CategoryModel> rootCategories)java.util.Collection<CategoryModel>getCategoriesForConfigAndProperty(IndexConfig indexConfig, IndexedProperty indexedProperty, java.lang.Object model)Returns a collection ofCategoryModelof a given indexedProperty that are fetched from the model based on the indexConfig.protected java.lang.StringgetCategoriesQualifier()protected CategoryServicegetCategoryService()protected java.util.Set<CategoryModel>getDirectSuperCategories(java.util.Set<ProductModel> products)protected ModelServicegetModelService()protected java.util.Set<ProductModel>getProducts(java.lang.Object model)protected java.lang.StringgetRootCategory()protected booleanisBlockedCategory(CategoryModel category)booleanisIncludeClassificationClasses()protected java.util.Set<CategoryModel>lookupRootCategories(java.util.Collection<CatalogVersionModel> catalogVersions)voidsetCategoriesQualifier(java.lang.String categoriesQualifier)voidsetCategoryService(CategoryService categoryService)voidsetIncludeClassificationClasses(boolean includeClassificationClasses)voidsetModelService(ModelService modelService)voidsetRootCategory(java.lang.String rootCategory)
-
-
-
Method Detail
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getCategoriesQualifier
protected java.lang.String getCategoriesQualifier()
-
setCategoriesQualifier
public void setCategoriesQualifier(java.lang.String categoriesQualifier)
-
isIncludeClassificationClasses
public boolean isIncludeClassificationClasses()
-
setIncludeClassificationClasses
public void setIncludeClassificationClasses(boolean includeClassificationClasses)
-
getRootCategory
protected java.lang.String getRootCategory()
-
setRootCategory
public void setRootCategory(java.lang.String rootCategory)
-
getCategoryService
protected CategoryService getCategoryService()
-
setCategoryService
public void setCategoryService(CategoryService categoryService)
-
getCategoriesForConfigAndProperty
public java.util.Collection<CategoryModel> getCategoriesForConfigAndProperty(IndexConfig indexConfig, IndexedProperty indexedProperty, java.lang.Object model)
Description copied from interface:CategorySourceReturns a collection ofCategoryModelof a given indexedProperty that are fetched from the model based on the indexConfig.- Specified by:
getCategoriesForConfigAndPropertyin interfaceCategorySource- Parameters:
indexConfig- index configindexedProperty- indexed propertymodel- model- Returns:
- Collection of categories
-
getProducts
protected java.util.Set<ProductModel> getProducts(java.lang.Object model)
-
getDirectSuperCategories
protected java.util.Set<CategoryModel> getDirectSuperCategories(java.util.Set<ProductModel> products)
-
getAllCategories
protected java.util.Collection<CategoryModel> getAllCategories(CategoryModel directCategory, java.util.Set<CategoryModel> rootCategories)
-
isBlockedCategory
protected boolean isBlockedCategory(CategoryModel category)
-
collectSuperCategories
protected java.util.Set<CategoryModel> collectSuperCategories(CategoryModel category, java.util.Set<CategoryModel> rootCategories, java.util.Set<CategoryModel> path)
-
lookupRootCategories
protected java.util.Set<CategoryModel> lookupRootCategories(java.util.Collection<CatalogVersionModel> catalogVersions)
-
catalogVersionToString
protected java.lang.String catalogVersionToString(CatalogVersionModel catalogVersion)
-
catalogVersionsToString
protected java.lang.String catalogVersionsToString(java.util.Collection<CatalogVersionModel> catalogVersions)
-
-