public class WicketCartService<P extends Product,S extends EComSession<U>,U extends IGenericEcomUser> extends AbstractCartService<P,S,javax.servlet.http.HttpServletRequest,U>
CartService
uses EComSession
(needs Apache Wicket)
ChangeGenerator
; it will also generate Events of TypeServletCartService
persistSessionCarts, saleStrategy
CART_TYPE_SHOPPING, CART_TYPE_WISHLIST
Constructor and Description |
---|
WicketCartService() |
WicketCartService(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, validateCart
public WicketCartService()
public WicketCartService(ProductService<P> productService)
protected final String getSessionId(S session)
AbstractCartService
getSessionId
in class AbstractCartService<P extends Product,S extends EComSession<U>,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>
session
- as SESSIONprotected U getUser(S session)
AbstractCartService
getUser
in class AbstractCartService<P extends Product,S extends EComSession<U>,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>
session
- as SESSIONprotected final String getUserId(S session)
AbstractCartService
getUserId
in class AbstractCartService<P extends Product,S extends EComSession<U>,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>
session
- as SESSIONprotected String getOrigin(S session, javax.servlet.http.HttpServletRequest request)
AbstractCartService
getOrigin
in class AbstractCartService<P extends Product,S extends EComSession<U>,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>
session
- as SESSIONprotected final void setCartToSession(S session, Cart c)
AbstractCartService
Cart
it carries. Ability to Get that.setCartToSession
in class AbstractCartService<P extends Product,S extends EComSession<U>,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>
session
- as SESSIONprotected final Cart getCartFromSession(S session)
AbstractCartService
Cart
it carries. Ability to Set that.getCartFromSession
in class AbstractCartService<P extends Product,S extends EComSession<U>,javax.servlet.http.HttpServletRequest,U extends IGenericEcomUser>
session
- as SESSIONpublic String getCartUserId(S session, U user, String cartType)
CartService
session
- as SESSIONuser
- as USERcartType
- as Stringpublic String getCartSessionId(S session, String cartType)
session
- as SESSIONcartType
- as StringCopyright © 2018. All rights reserved.