Class SkuPricingConsiderationContext
java.lang.Object
org.broadleafcommerce.core.catalog.service.dynamic.SkuPricingConsiderationContext
Convenient place to store the pricing considerations context and the pricing service on thread local. This class is
usually filled out by a DynamicSkuPricingFilter. The default implementation of this is DefaultDynamicSkuPricingFilter.
- Author:
- jfischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMapprotected static final ConcurrentHashMap<String,Field> protected booleanprotected HashMap<Long,DynamicSkuPrices> protected DynamicSkuPricingService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic DynamicSkuPricesgetDynamicSkuPrices(Sku sku) protected static FieldgetSingleField(Class<?> clazz, String fieldName) static HashMapstatic DynamicSkuPricingServicestatic Map<Long,DynamicSkuPrices> static booleanstatic booleanstatic voidremoveFromThreadCache(Long skuId) static voidsetSkuPricingConsiderationContext(HashMap skuPricingConsiderations) static voidsetSkuPricingService(DynamicSkuPricingService skuPricingService) static void
-
Field Details
-
FIELD_CACHE
-
pricingService
-
considerations
-
isActive
protected boolean isActive -
pricesBySku
-
-
Constructor Details
-
SkuPricingConsiderationContext
public SkuPricingConsiderationContext()
-
-
Method Details
-
getSkuPricingConsiderationContext
-
setSkuPricingConsiderationContext
-
getSkuPricingService
-
setSkuPricingService
-
startPricingConsideration
public static void startPricingConsideration() -
endPricingConsideration
public static void endPricingConsideration() -
isPricingConsiderationActive
public static boolean isPricingConsiderationActive() -
hasDynamicPricing
public static boolean hasDynamicPricing() -
getThreadCache
-
clearThreadCache
public static void clearThreadCache() -
removeFromThreadCache
-
getDynamicSkuPrices
-
getSingleField
protected static Field getSingleField(Class<?> clazz, String fieldName) throws IllegalStateException - Throws:
IllegalStateException
-