public class ServletCartService<P extends Product,S extends javax.servlet.http.HttpSession,U extends IGenericEcomUser> extends AbstractCartService<P,S,javax.servlet.http.HttpServletRequest,U>
CartService
ChangeGenerator; it will also generate Events of Type| Modifier and Type | Field and Description |
|---|---|
static String |
SESSION_ATTRIB_CART
Cart object in Session |
persistSessionCarts, saleStrategyCART_TYPE_SHOPPING, CART_TYPE_WISHLIST| Constructor and Description |
|---|
ServletCartService() |
ServletCartService(ProductService<P> productService) |
| Modifier and Type | Method and Description |
|---|---|
protected Cart |
getCartFromSession(S session)
The Session is expected to be related to the
Cart it carries. |
String |
getCartSessionId(S session,
String cartType)
A client cart is identified by its user name (primary) and a sessionId (for session based carts like shopping cart).
|
String |
getCartUserId(S session,
U user,
String cartType)
A client cart is identified by its user name (primary) and a sessionId (for session based carts like shopping cart).
|
protected String |
getOrigin(S session,
javax.servlet.http.HttpServletRequest request)
Get the origin of the user Request
|
protected String |
getSessionId(S session)
Get the Id associated with the Session
|
protected U |
getUser(S session)
Get the User associated with the Session
|
protected String |
getUserId(S session)
Get the User Id associated with the Session
|
protected void |
setCartToSession(S session,
Cart c)
The Session is expected to be related to the
Cart it carries. |
actionOnUpdateCartType, addChangeListener, convertToProductList, convertToProductQuantityMap, getCartForSession, getCartForUser, getCartProductTransform, getListeners, getProductService, getSaleStrategy, getUserAttributeDao, isPersistSessionCarts, mergeCarts, notifyAllListeners, saveCart, setCartProductTransform, setListeners, setPersistSessionCarts, setProductService, setSaleStrategy, setUserAttributeDao, subtractCart, validateCartpublic static final String SESSION_ATTRIB_CART
Cart object in Sessionpublic ServletCartService()
public ServletCartService(ProductService<P> productService)
protected final String getSessionId(S session)
AbstractCartServicegetSessionId in class AbstractCartService<P extends Product,S extends javax.servlet.http.HttpSession,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>session - as SESSIONprotected U getUser(S session)
AbstractCartServicegetUser in class AbstractCartService<P extends Product,S extends javax.servlet.http.HttpSession,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>session - as SESSIONprotected final String getUserId(S session)
AbstractCartServicegetUserId in class AbstractCartService<P extends Product,S extends javax.servlet.http.HttpSession,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>session - as SESSIONprotected String getOrigin(S session, javax.servlet.http.HttpServletRequest request)
AbstractCartServicegetOrigin in class AbstractCartService<P extends Product,S extends javax.servlet.http.HttpSession,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>session - as SESSIONprotected final void setCartToSession(S session, Cart c)
AbstractCartServiceCart it carries. Ability to Get that.setCartToSession in class AbstractCartService<P extends Product,S extends javax.servlet.http.HttpSession,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>session - as SESSIONprotected final Cart getCartFromSession(S session)
AbstractCartServiceCart it carries. Ability to Set that.getCartFromSession in class AbstractCartService<P extends Product,S extends javax.servlet.http.HttpSession,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>session - as SESSIONpublic String getCartUserId(S session, U user, String cartType)
CartServicesession - as SESSIONuser - as USERcartType - as Stringpublic String getCartSessionId(S session, String cartType)
session - as SESSIONcartType - as StringCopyright © 2018. All rights reserved.