org.broadleafcommerce.core.web.catalog
Class DefaultDynamicSkuPricingFilter

java.lang.Object
  extended by org.broadleafcommerce.core.web.catalog.AbstractDynamicSkuPricingFilter
      extended by org.broadleafcommerce.core.web.catalog.DefaultDynamicSkuPricingFilter
All Implemented Interfaces:
javax.servlet.Filter, DynamicSkuPricingFilter

public class DefaultDynamicSkuPricingFilter
extends AbstractDynamicSkuPricingFilter

Register this filter via Spring DelegatingFilterProxy, or register your own implementation that provides additional, desirable members to the pricingConsiderations Map that is generated from the getPricingConsiderations method.

Author:
jfischer

Field Summary
protected  CustomerState customerState
           
protected  DynamicSkuPricingService skuPricingService
           
 
Constructor Summary
DefaultDynamicSkuPricingFilter()
           
 
Method Summary
 DynamicSkuPricingService getDynamicSkuPricingService(javax.servlet.ServletRequest request)
          The result of this invocation should be set on SkuPricingConsiderationContext.setSkuPricingService(DynamicSkuPricingService).
 HashMap getPricingConsiderations(javax.servlet.ServletRequest request)
          The result of this invocation should be set on SkuPricingConsiderationContext.setSkuPricingConsiderationContext(HashMap) and ultimately passed to DynamicSkuPricingService to determine prices.
 
Methods inherited from class org.broadleafcommerce.core.web.catalog.AbstractDynamicSkuPricingFilter
destroy, doFilter, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

skuPricingService

protected DynamicSkuPricingService skuPricingService

customerState

protected CustomerState customerState
Constructor Detail

DefaultDynamicSkuPricingFilter

public DefaultDynamicSkuPricingFilter()
Method Detail

getDynamicSkuPricingService

public DynamicSkuPricingService getDynamicSkuPricingService(javax.servlet.ServletRequest request)
Description copied from interface: DynamicSkuPricingFilter
The result of this invocation should be set on SkuPricingConsiderationContext.setSkuPricingService(DynamicSkuPricingService). This is the service that will be used in calculating dynamic prices for a Sku or product option value

Returns:
See Also:
Sku#getRetailPrice()}, Sku#getSalePrice()}

getPricingConsiderations

public HashMap getPricingConsiderations(javax.servlet.ServletRequest request)
Description copied from interface: DynamicSkuPricingFilter
The result of this invocation should be set on SkuPricingConsiderationContext.setSkuPricingConsiderationContext(HashMap) and ultimately passed to DynamicSkuPricingService to determine prices.

Returns:
a map of considerations to be used by the service in DynamicSkuPricingFilter.getDynamicSkuPricingService(ServletRequest).
See Also:
SkuPricingConsiderationContext#getSkuPricingConsiderationContext()}, DynamicSkuPricingService}


Copyright © 2013. All Rights Reserved.