Class CategoryUtil


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

      • module

        public static final java.lang.String module
    • Method Detail

      • getCatalogIdsByCategoryId

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

        This method is a supplement to CatalogWorker methods.

      • getCategoryTrail

        public static java.util.List<java.util.List<java.lang.String>> getCategoryTrail​(java.lang.String productCategoryId,
                                                                                        DispatchContext dctx)
      • getCategoryNameWithTrail

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

        public static java.lang.String getCategoryNameWithTrail​(java.lang.String productCategoryId,
                                                                java.lang.Boolean showDepth,
                                                                DispatchContext dctx)
      • getNextLevelFromCategoryId

        public static int getNextLevelFromCategoryId​(java.lang.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 java.lang.String getFacetFilterForCategory​(java.lang.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/".