Class CustomerState

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

@Component("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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.broadleafcommerce.profile.core.domain.Customer
     
    static org.broadleafcommerce.profile.core.domain.Customer
    getCustomer(jakarta.servlet.http.HttpServletRequest request)
     
    static org.broadleafcommerce.profile.core.domain.Customer
    getCustomer(org.springframework.web.context.request.WebRequest request)
     
    static void
    setCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomerState

      public CustomerState()
  • Method Details

    • getCustomer

      public static org.broadleafcommerce.profile.core.domain.Customer getCustomer(jakarta.servlet.http.HttpServletRequest request)
    • getCustomer

      public static org.broadleafcommerce.profile.core.domain.Customer getCustomer(org.springframework.web.context.request.WebRequest request)
    • getCustomer

      public static org.broadleafcommerce.profile.core.domain.Customer getCustomer()
    • setCustomer

      public static void setCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)