org.broadleafcommerce.profile.web.core.security
Class CustomerStateRequestProcessor

java.lang.Object
  extended by org.broadleafcommerce.profile.web.core.security.CustomerStateRequestProcessor
All Implemented Interfaces:
BroadleafWebRequestProcessor, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationEventPublisherAware

@Component(value="blCustomerStateRequestProcessor")
public class CustomerStateRequestProcessor
extends Object
implements org.springframework.context.ApplicationEventPublisherAware, BroadleafWebRequestProcessor

Author:
Phillip Verheyden
See Also:
CustomerStateFilter}

Field Summary
static String ANONYMOUS_CUSTOMER_SESSION_ATTRIBUTE_NAME
           
static String BLC_RULE_MAP_PARAM
           
protected  CustomerService customerService
           
protected  org.apache.commons.logging.Log logger
          Logger for this class and subclasses
 
Constructor Summary
CustomerStateRequestProcessor()
           
 
Method Summary
 String getAnonymousCustomerAttributeName()
          Returns the session attribute to store the anonymous customer.
static String getCustomerRequestAttributeName()
           
 void process(org.springframework.web.context.request.WebRequest request)
           
 Customer resolveAnonymousCustomer(org.springframework.web.context.request.WebRequest request)
          Implementors can subclass to change how anonymous customers are created.
 Customer resolveAuthenticatedCustomer(org.springframework.security.core.Authentication authentication)
          Subclasses can extend to resolve other types of Authentication tokens
 void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher)
           
static void setCustomerRequestAttributeName(String customerRequestAttributeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

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


BLC_RULE_MAP_PARAM

public static final String BLC_RULE_MAP_PARAM
See Also:
Constant Field Values

customerService

protected CustomerService customerService

ANONYMOUS_CUSTOMER_SESSION_ATTRIBUTE_NAME

public static final String ANONYMOUS_CUSTOMER_SESSION_ATTRIBUTE_NAME
See Also:
Constant Field Values
Constructor Detail

CustomerStateRequestProcessor

public CustomerStateRequestProcessor()
Method Detail

process

public void process(org.springframework.web.context.request.WebRequest request)
Specified by:
process in interface BroadleafWebRequestProcessor

resolveAuthenticatedCustomer

public Customer resolveAuthenticatedCustomer(org.springframework.security.core.Authentication authentication)
Subclasses can extend to resolve other types of Authentication tokens

Parameters:
authentication -
Returns:

resolveAnonymousCustomer

public Customer resolveAnonymousCustomer(org.springframework.web.context.request.WebRequest request)
Implementors can subclass to change how anonymous customers are created.

Parameters:
request -
Returns:

getAnonymousCustomerAttributeName

public String getAnonymousCustomerAttributeName()
Returns the session attribute to store the anonymous customer. Some implementations may wish to have a different anonymous customer instance (and as a result a different cart).

Returns:

setApplicationEventPublisher

public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher)
Specified by:
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware

getCustomerRequestAttributeName

public static String getCustomerRequestAttributeName()

setCustomerRequestAttributeName

public static void setCustomerRequestAttributeName(String customerRequestAttributeName)


Copyright © 2013. All Rights Reserved.