org.broadleafcommerce.profile.web.core
Class CustomerState

java.lang.Object
  extended by org.broadleafcommerce.profile.web.core.CustomerState

@Component(value="blCustomerState")
public class CustomerState
extends Object

Convenient class to get the active customer from the current request. This state is kept up-to-date in regards to the database throughout the lifetime of the request via the CustomerStateRefresher.

Author:
Jeff Fischer, Phillip Verheyden (phillipuniverse)

Constructor Summary
CustomerState()
           
 
Method Summary
static Customer getCustomer()
          Utilizes the current BroadleafRequestContext to lookup a customer from the request.
static Customer getCustomer(javax.servlet.http.HttpServletRequest request)
           
static Customer getCustomer(org.springframework.web.context.request.WebRequest request)
           
static void setCustomer(Customer customer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomerState

public CustomerState()
Method Detail

getCustomer

public static Customer getCustomer(javax.servlet.http.HttpServletRequest request)

getCustomer

public static Customer getCustomer(org.springframework.web.context.request.WebRequest request)

getCustomer

public static Customer getCustomer()
Utilizes the current BroadleafRequestContext to lookup a customer from the request.

Returns:

setCustomer

public static void setCustomer(Customer customer)


Copyright © 2013. All Rights Reserved.