Class 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 Detail

      • DefaultCategorySource

        public DefaultCategorySource()
    • 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)
      • 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: CategorySource
        Returns a collection of CategoryModel of a given indexedProperty that are fetched from the model based on the indexConfig.
        Specified by:
        getCategoriesForConfigAndProperty in interface CategorySource
        Parameters:
        indexConfig - index config
        indexedProperty - indexed property
        model - 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)
      • isBlockedCategory

        protected boolean isBlockedCategory​(CategoryModel category)
      • catalogVersionToString

        protected java.lang.String catalogVersionToString​(CatalogVersionModel catalogVersion)
      • catalogVersionsToString

        protected java.lang.String catalogVersionsToString​(java.util.Collection<CatalogVersionModel> catalogVersions)