|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BasketMgrIf
BasketMgrIf Interface which an implementation of this manager must adhere to.
| Method Summary | |
|---|---|
int |
addToBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
Determines the customerId to use and calls the private method with the customerId. |
int |
addToBasketWithOptions(java.lang.String sessionId,
int customerId,
BasketIf item,
AddToBasketOptionsIf options)
If options is set to null, this method is identical to addToBasket(). |
java.lang.String |
createEncodedProduct(int productId,
OptionIf[] opts)
Create the encoded product The customers_basket table contains a products_id field which is encoded like this : 1{3}6{4}3 which means product of id==1 with product_options of id==3 and product_options_values of id==6 followed by product_options of id==4 and product_options_values of id==3. |
Option |
findOptionInProduct(ProductIf p,
Option o)
The basket object must have a populated product object with options. |
Basket[] |
getBasketItemsPerCustomer(java.lang.String sessionId,
int customerId,
int languageId)
Get the basket items for a customer. |
Basket[] |
getBasketItemsPerCustomerWithOptions(java.lang.String sessionId,
int customerId,
int languageId,
AddToBasketOptionsIf options)
Get the basket items for a customer. |
void |
mergeBaskets(java.lang.String sessionId,
int customerFromId)
Add all items from the basket of customerFrom to the basket of customerTo which is retrieved from the sessionId. |
void |
mergeBasketsWithOptions(java.lang.String sessionId,
int customerFromId,
AddToBasketOptionsIf options)
Add all items from the basket of customerFrom to the basket of customerTo which is retrieved from the sessionId. |
void |
populateOptsForBasketItem(Basket item,
int priceId,
int languageId,
AddToBasketOptionsIf a2bOptions)
The customers_basket table contains a products_id field which is encoded like this : 1{4}3{3}6 which means product of id==1 with product_options of id==4 and product_options_values of id==3 followed by product_options of id==3 and product_options_values of id==6. |
void |
removeBasketItemsPerCustomer(java.lang.String sessionId,
int customerId)
We determine which customerId to use and then delete all basket items that exist for this customer by calling the private method. |
void |
removeFromBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
We must remove the customers_basket record and any associated customers_basket_attributes records. |
void |
updateBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
If the sessionId is null, we check the customerId to ensure that it is negative. |
void |
updateBasketWithOptions(java.lang.String sessionId,
int customerId,
BasketIf item,
AddToBasketOptionsIf options)
If the sessionId is null, we check the customerId to ensure that it is negative. |
Basket[] |
updateBasketWithStockInfo(BasketIf[] basketItems)
Receives an array of basket items and updates each one with the current stock level. |
Basket[] |
updateBasketWithStockInfoWithOptions(BasketIf[] basketItems,
AddToBasketOptionsIf options)
Receives an array of basket items and updates each one with the current stock level. |
| Method Detail |
|---|
Basket[] getBasketItemsPerCustomer(java.lang.String sessionId,
int customerId,
int languageId)
throws java.lang.Exception
sessionId - customerId - languageId -
java.lang.Exception
Basket[] getBasketItemsPerCustomerWithOptions(java.lang.String sessionId,
int customerId,
int languageId,
AddToBasketOptionsIf options)
throws java.lang.Exception
sessionId - customerId - languageId - options -
java.lang.Exception
int addToBasketWithOptions(java.lang.String sessionId,
int customerId,
BasketIf item,
AddToBasketOptionsIf options)
throws java.lang.Exception
sessionId - customerId - item - options -
java.lang.Exception
int addToBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
throws java.lang.Exception
sessionId - customerId - item -
java.lang.Exception
Option findOptionInProduct(ProductIf p,
Option o)
throws KKException
p - o -
KKException
void updateBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
throws KKException,
com.workingdogs.village.DataSetException,
java.lang.Exception
sessionId - customerId - item -
java.lang.Exception
com.workingdogs.village.DataSetException
KKException
void updateBasketWithOptions(java.lang.String sessionId,
int customerId,
BasketIf item,
AddToBasketOptionsIf options)
throws KKException,
com.workingdogs.village.DataSetException,
java.lang.Exception
sessionId - customerId - item - options -
java.lang.Exception
com.workingdogs.village.DataSetException
KKException
void removeBasketItemsPerCustomer(java.lang.String sessionId,
int customerId)
throws java.lang.Exception
sessionId - customerId -
java.lang.Exception
void removeFromBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
throws java.lang.Exception
sessionId - customerId - item -
java.lang.Exception
java.lang.String createEncodedProduct(int productId,
OptionIf[] opts)
productId - opts -
void mergeBaskets(java.lang.String sessionId,
int customerFromId)
throws java.lang.Exception
sessionId - customerFromId -
java.lang.Exception
void mergeBasketsWithOptions(java.lang.String sessionId,
int customerFromId,
AddToBasketOptionsIf options)
throws java.lang.Exception
sessionId - customerFromId - options -
java.lang.Exception
Basket[] updateBasketWithStockInfo(BasketIf[] basketItems)
throws java.lang.Exception
basketItems -
java.lang.Exception
Basket[] updateBasketWithStockInfoWithOptions(BasketIf[] basketItems,
AddToBasketOptionsIf options)
throws java.lang.Exception
basketItems - options - An object containing options for the method. It may be set to null.
java.lang.Exception
void populateOptsForBasketItem(Basket item,
int priceId,
int languageId,
AddToBasketOptionsIf a2bOptions)
throws java.lang.Exception
item - priceId - languageId - a2bOptions -
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||