Interface SuperCategoriesResolver<T extends ItemModel>


  • public interface SuperCategoriesResolver<T extends ItemModel>
    The SuperCategoriesResolver is used to return the super categories of the given type in a special way. For CategoryModel the implementation could just return the connected super categories, for products ( VariantProductModel!) the super categories for the base product could be returned. Other implementations (product code starts with '10' then return a certain ClassificationClassModel) are also possible.

    example:

     new SuperCategoriesResolver<CategoryModel>()
     {
            @Override
            public Set<CategoryModel> getSuperCategories(final CategoryModel item)
        {
                    return item == null || item.getSupercategories() == null ? Collections.EMPTY_SET : new LinkedHashSet<CategoryModel>(
                                    item.getSupercategories());
        }
     };
     
    • Method Detail

      • getSuperCategories

        java.util.Set<CategoryModel> getSuperCategories​(T item)
        Implement this method for getting the super categories in a special way. Null as return value is allowed.