org.broadleafcommerce.core.web.catalog
Class DynamicSkuPricingInterceptor

java.lang.Object
  extended by org.broadleafcommerce.core.web.catalog.DynamicSkuPricingInterceptor
All Implemented Interfaces:
org.springframework.web.context.request.WebRequestInterceptor

public abstract class DynamicSkuPricingInterceptor
extends Object
implements org.springframework.web.context.request.WebRequestInterceptor

Interceptor version of the DynamicSkuPricingFilter. If you are using Broadleaf in a Servlet web application then you should instead be using the DefaultDynamicSkuPricingFilter.

This should be configured in your Spring context, but not the root one. So if you are running in a Portlet environment, then you should configure the interceptor in each individual portlet's context.

Author:
Phillip Verheyden (phillipuniverse)
See Also:
DynamicSkuPricingFilter}

Field Summary
protected  DynamicSkuPricingService skuPricingService
           
 
Constructor Summary
DynamicSkuPricingInterceptor()
           
 
Method Summary
 void afterCompletion(org.springframework.web.context.request.WebRequest request, Exception ex)
           
 DynamicSkuPricingService getDynamicSkuPricingService(org.springframework.web.context.request.WebRequest request)
           
abstract  HashMap getPricingConsiderations(org.springframework.web.context.request.WebRequest request)
          Override to supply your own considerations to pass to the SkuPricingConsiderationContext.
 void postHandle(org.springframework.web.context.request.WebRequest request, org.springframework.ui.ModelMap model)
           
 void preHandle(org.springframework.web.context.request.WebRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

skuPricingService

protected DynamicSkuPricingService skuPricingService
Constructor Detail

DynamicSkuPricingInterceptor

public DynamicSkuPricingInterceptor()
Method Detail

preHandle

public void preHandle(org.springframework.web.context.request.WebRequest request)
               throws Exception
Specified by:
preHandle in interface org.springframework.web.context.request.WebRequestInterceptor
Throws:
Exception

getDynamicSkuPricingService

public DynamicSkuPricingService getDynamicSkuPricingService(org.springframework.web.context.request.WebRequest request)

getPricingConsiderations

public abstract HashMap getPricingConsiderations(org.springframework.web.context.request.WebRequest request)
Override to supply your own considerations to pass to the SkuPricingConsiderationContext.

Parameters:
request -
Returns:
considerations that the DynamicSkuPricingService will evaluate when implementing custom pricing

postHandle

public void postHandle(org.springframework.web.context.request.WebRequest request,
                       org.springframework.ui.ModelMap model)
                throws Exception
Specified by:
postHandle in interface org.springframework.web.context.request.WebRequestInterceptor
Throws:
Exception

afterCompletion

public void afterCompletion(org.springframework.web.context.request.WebRequest request,
                            Exception ex)
                     throws Exception
Specified by:
afterCompletion in interface org.springframework.web.context.request.WebRequestInterceptor
Throws:
Exception


Copyright © 2013. All Rights Reserved.