Class CategoryUtil


  • public final class CategoryUtil
    extends Object
    Product category util class for solr.
    • Field Detail

      • module

        public static final String module
    • Method Detail

      • getCatalogIdsByCategoryId

        public static List<String> getCatalogIdsByCategoryId​(Delegator delegator,
                                                             String productCategoryId)
        Gets catalog IDs for specified product category.

        This method is a supplement to CatalogWorker methods.

      • getCategoryNameWithTrail

        public static String getCategoryNameWithTrail​(String productCategoryId,
                                                      DispatchContext dctx)
        Returns categoryName with trail
      • getNextLevelFromCategoryId

        public static int getNextLevelFromCategoryId​(String productCategoryId,
                                                     DispatchContext dctx)
        Returns nextLevel from trailed category.

        Ie for "1/SYRACUS2_CATEGORY/FICTION_C/" the returned value would be 2.

      • getFacetFilterForCategory

        public static String getFacetFilterForCategory​(String productCategoryId,
                                                       DispatchContext dctx)
        Returns proper FacetFilter from trailed category.

        Ie for "1/SYRACUS2_CATEGORY/FICTION_C/" the returned value would be "2/SYRACUS2_CATEGORY/FICTION_C/".