com.elasticpath.sfweb.service
Class WebCustomerSessionServiceImpl

java.lang.Object
  extended by com.elasticpath.sfweb.service.WebCustomerSessionServiceImpl
All Implemented Interfaces:
WebCustomerSessionService

public class WebCustomerSessionServiceImpl
extends java.lang.Object
implements WebCustomerSessionService

WebCustomerSessionService provides services for managing CustomerSessions in the web application session, including cookie management.


Constructor Summary
WebCustomerSessionServiceImpl()
           
 
Method Summary
 Utility getUtility()
          Returns the utility.
 void handleCreateNewAccount(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Customer customer)
          Updates the session and cookie when a new account is created.
 void handleCustomerSignIn(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Customer customer)
          Update the session when a customer signs in.
 void handleFilterRequest(javax.servlet.ServletRequest inRequest, javax.servlet.ServletResponse inResponse)
          Handle a request intercepted by a filter.
 void setCustomerSessionService(CustomerSessionService customerSessionService)
          Set the customer session service.
 void setElasticPath(ElasticPath elasticPath)
          Sets the elastic path context.
 void setRequestHelper(RequestHelper requestHelper)
          Sets the request helper.
 void setShoppingCartService(ShoppingCartService shoppingCartService)
          Set the shopping cart service.
 void setUtility(Utility utility)
          Sets the utility.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebCustomerSessionServiceImpl

public WebCustomerSessionServiceImpl()
Method Detail

getUtility

public Utility getUtility()
Returns the utility.

Returns:
the utility.

handleCreateNewAccount

public void handleCreateNewAccount(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response,
                                   Customer customer)
Updates the session and cookie when a new account is created.

Specified by:
handleCreateNewAccount in interface WebCustomerSessionService
Parameters:
request - the HTTP Request
response - the HTTP Response
customer - the new customer

handleCustomerSignIn

public void handleCustomerSignIn(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 Customer customer)
Update the session when a customer signs in.

Specified by:
handleCustomerSignIn in interface WebCustomerSessionService
Parameters:
request - the HTTP request
response - the HTTP response
customer - the customer who has signed in

handleFilterRequest

public void handleFilterRequest(javax.servlet.ServletRequest inRequest,
                                javax.servlet.ServletResponse inResponse)
Handle a request intercepted by a filter. Performs any required actions to update the CustomerSession, shopping cart, and cookie.

Specified by:
handleFilterRequest in interface WebCustomerSessionService
Parameters:
inRequest - the request
inResponse - the response

setCustomerSessionService

public void setCustomerSessionService(CustomerSessionService customerSessionService)
Set the customer session service.

Parameters:
customerSessionService - the customer session service to set.

setElasticPath

public void setElasticPath(ElasticPath elasticPath)
Sets the elastic path context.

Parameters:
elasticPath - the elastic path context

setRequestHelper

public void setRequestHelper(RequestHelper requestHelper)
Sets the request helper.

Parameters:
requestHelper - the request helper

setShoppingCartService

public void setShoppingCartService(ShoppingCartService shoppingCartService)
Set the shopping cart service.

Parameters:
shoppingCartService - the shopping cart service to set.

setUtility

public void setUtility(Utility utility)
Sets the utility.

Parameters:
utility - the utility.