org.broadleafcommerce.core.web.order.security
Class CartStateRequestProcessor

java.lang.Object
  extended by org.broadleafcommerce.common.web.AbstractBroadleafWebRequestProcessor
      extended by org.broadleafcommerce.core.web.order.security.CartStateRequestProcessor
All Implemented Interfaces:
BroadleafWebRequestProcessor

@Component(value="blCartStateRequestProcessor")
public class CartStateRequestProcessor
extends AbstractBroadleafWebRequestProcessor

Genericized version of the CartStateFilter. This was made to facilitate reuse between Servlet Filters, Portlet Filters and Spring MVC interceptors. Spring has an easy way of converting HttpRequests and PortletRequests into WebRequests via
new ServletWebRequest(httpServletRequest); new PortletWebRequest(portletRequest);
For the interceptor pattern, you can simply implement a WebRequestInterceptor to invoke from there.

Author:
Phillip Verheyden
See Also:
CartStateFilter}, BroadleafWebRequestProcessor}, ServletWebRequest}, org.springframework.web.portlet.context.PortletWebRequest}

Field Summary
static String BLC_RULE_MAP_PARAM
           
protected static String cartRequestAttributeName
           
protected  boolean copyCartWhenSpecifiedStateChanges
           
protected  org.apache.commons.logging.Log LOG
          Logger for this class and subclasses
protected  OrderService orderService
           
protected  UpdateCartService updateCartService
           
 
Constructor Summary
CartStateRequestProcessor()
           
 
Method Summary
static String getCartRequestAttributeName()
           
 boolean isCopyCartWhenSpecifiedStateChanges()
          Gets whether or not the cart should be copied to a new cart and then repriced if UpdateCartService.validateCart(Order) throws an IllegalArgumentException
 void process(org.springframework.web.context.request.WebRequest request)
           
static void setCartRequestAttributeName(String cartRequestAttributeName)
           
 void setCopyCartWhenSpecifiedStateChanges(boolean copyCartWhenSpecifiedStateChanges)
           
 
Methods inherited from class org.broadleafcommerce.common.web.AbstractBroadleafWebRequestProcessor
postProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected final org.apache.commons.logging.Log LOG
Logger for this class and subclasses


BLC_RULE_MAP_PARAM

public static final String BLC_RULE_MAP_PARAM
See Also:
Constant Field Values

copyCartWhenSpecifiedStateChanges

protected boolean copyCartWhenSpecifiedStateChanges

orderService

protected OrderService orderService

updateCartService

protected UpdateCartService updateCartService

cartRequestAttributeName

protected static String cartRequestAttributeName
Constructor Detail

CartStateRequestProcessor

public CartStateRequestProcessor()
Method Detail

process

public void process(org.springframework.web.context.request.WebRequest request)

getCartRequestAttributeName

public static String getCartRequestAttributeName()

setCartRequestAttributeName

public static void setCartRequestAttributeName(String cartRequestAttributeName)

isCopyCartWhenSpecifiedStateChanges

public boolean isCopyCartWhenSpecifiedStateChanges()
Gets whether or not the cart should be copied to a new cart and then repriced if UpdateCartService.validateCart(Order) throws an IllegalArgumentException

Returns:
the copyCartWhenSpecifiedStateChanges

setCopyCartWhenSpecifiedStateChanges

public void setCopyCartWhenSpecifiedStateChanges(boolean copyCartWhenSpecifiedStateChanges)
Parameters:
copyCartWhenSpecifiedStateChanges - whether or not the old cart should be copied to a new cart and then repriced UpdateCartService.validateCart(Order) throws an IllegalArgumentException


Copyright © 2013. All Rights Reserved.