Class CategoryUtil

java.lang.Object
org.apache.ofbiz.solr.CategoryUtil

public final class CategoryUtil extends Object
Product category util class for solr.
  • Method Details

    • 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.

    • getCategoryTrail

      public static List<List<String>> getCategoryTrail(String productCategoryId, DispatchContext dctx)
    • getCategoryNameWithTrail

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

      public static String getCategoryNameWithTrail(String productCategoryId, Boolean showDepth, DispatchContext dctx)
    • 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/".