org.broadleafcommerce.common.web
Class BroadleafRequestCustomerResolverImpl

java.lang.Object
  extended by org.broadleafcommerce.common.web.BroadleafRequestCustomerResolverImpl
All Implemented Interfaces:
BroadleafRequestCustomerResolver, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Service(value="blRequestCustomerResolver")
public class BroadleafRequestCustomerResolverImpl
extends Object
implements org.springframework.context.ApplicationContextAware, BroadleafRequestCustomerResolver

By default, we'll resolve the customer from the "customer" attribute on the request.

Author:
Andre Azzolini (apazzolini)

Field Summary
protected static String customerRequestAttributeName
           
 
Constructor Summary
BroadleafRequestCustomerResolverImpl()
           
 
Method Summary
 Object getCustomer()
           
 Object getCustomer(javax.servlet.http.HttpServletRequest request)
           
 Object getCustomer(org.springframework.web.context.request.WebRequest request)
           
 String getCustomerRequestAttributeName()
           
static BroadleafRequestCustomerResolver getRequestCustomerResolver()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setCustomer(Object customer)
           
 void setCustomerRequestAttributeName(String customerRequestAttributeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

customerRequestAttributeName

protected static String customerRequestAttributeName
Constructor Detail

BroadleafRequestCustomerResolverImpl

public BroadleafRequestCustomerResolverImpl()
Method Detail

getCustomer

public Object getCustomer(javax.servlet.http.HttpServletRequest request)
Specified by:
getCustomer in interface BroadleafRequestCustomerResolver

getCustomer

public Object getCustomer()
Specified by:
getCustomer in interface BroadleafRequestCustomerResolver

getCustomer

public Object getCustomer(org.springframework.web.context.request.WebRequest request)
Specified by:
getCustomer in interface BroadleafRequestCustomerResolver

setCustomer

public void setCustomer(Object customer)
Specified by:
setCustomer in interface BroadleafRequestCustomerResolver

getCustomerRequestAttributeName

public String getCustomerRequestAttributeName()
Specified by:
getCustomerRequestAttributeName in interface BroadleafRequestCustomerResolver

setCustomerRequestAttributeName

public void setCustomerRequestAttributeName(String customerRequestAttributeName)
Specified by:
setCustomerRequestAttributeName in interface BroadleafRequestCustomerResolver

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getRequestCustomerResolver

public static BroadleafRequestCustomerResolver getRequestCustomerResolver()


Copyright © 2013. All Rights Reserved.