Class ParametricSearch

java.lang.Object
org.apache.ofbiz.product.feature.ParametricSearch

public class ParametricSearch extends Object
Utilities for parametric search based on features.
  • Field Details

    • DEFAULT_PER_TYPE_MAX_SIZE

      public static final int DEFAULT_PER_TYPE_MAX_SIZE
      See Also:
  • Constructor Details

    • ParametricSearch

      public ParametricSearch()
  • Method Details

    • makeCategoryFeatureLists

      public static Map<String,List<GenericValue>> makeCategoryFeatureLists(String productCategoryId, Delegator delegator)
      Gets all features associated with the specified category through:
      ProductCategory -> ProductFeatureCategoryAppl -> ProductFeatureCategory -> ProductFeature.
      Returns:
      a Map of Lists of ProductFeature GenericValue objects organized by productFeatureTypeId.
    • makeCategoryFeatureLists

      public static Map<String,List<GenericValue>> makeCategoryFeatureLists(String productCategoryId, Delegator delegator, int perTypeMaxSize)
    • getAllFeaturesByType

      public static Map<String,List<GenericValue>> getAllFeaturesByType(Delegator delegator)
    • getAllFeaturesByType

      public static Map<String,List<GenericValue>> getAllFeaturesByType(Delegator delegator, int perTypeMaxSize)
    • makeFeatureIdByTypeMap

      public static Map<String,String> makeFeatureIdByTypeMap(ServletRequest request)
    • makeFeatureIdByTypeMap

      public static Map<String,String> makeFeatureIdByTypeMap(Map<String,Object> parameters)
      Handles parameters coming in prefixed with "pft_" where the text in the key following the prefix is a productFeatureTypeId and the value is a productFeatureId; meant to be used with drop-downs and such
    • makeFeatureIdListFromPrefixed

      public static List<String> makeFeatureIdListFromPrefixed(Map<String,Object> parameters)
      Handles parameters coming in prefixed with "SEARCH_FEAT" where the parameter value is a productFeatureId; meant to be used with text entry boxes or check-boxes and such
    • makeFeatureIdByTypeString

      public static String makeFeatureIdByTypeString(Map<String,String> featureIdByType)
    • makeProductFeatureCategoryIdListFromPrefixed

      public static List<String> makeProductFeatureCategoryIdListFromPrefixed(Map<String,Object> parameters)
      Handles parameters coming in prefixed with "SEARCH_PROD_FEAT_CAT" where the parameter value is a productFeatureCategoryId; meant to be used with text entry boxes or check-boxes and such