|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.bl.BaseMgr
com.konakart.bl.WishListMgr
public class WishListMgr
Manager for wish lists
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
the log |
| Fields inherited from class com.konakart.bl.BaseMgr |
|---|
templateBaseDir |
| Constructor Summary | |
|---|---|
WishListMgr(KKEngIf eng)
Constructor |
|
| Method Summary | |
|---|---|
int |
addToWishList(java.lang.String sessionId,
WishListItemIf wishListItem)
Add a WishListItem object to the wish list referenced by wishListId. |
int |
addToWishListWithOptions(java.lang.String sessionId,
WishListItemIf wishListItem,
AddToWishListOptionsIf options)
Add a WishListItem object to the wish list referenced by wishListId. |
protected void |
checkWishListItemOptions(WishListItem wli)
We may have the case where the wish list item object has an array of options that only have the id and value id set. |
protected FetchProductOptionsIf |
createFetchProductOptions(AddToWishListOptionsIf options)
Creates a FetchProductOptions object from an AddToWishListOptions |
int |
createWishList(java.lang.String sessionId,
WishListIf wishList)
Create a wish list from a WishList object. |
int |
createWishListWithOptions(java.lang.String sessionId,
WishListIf wishList,
AddToWishListOptionsIf options)
Create a wish list from a WishList object. |
void |
deleteWishList(java.lang.String sessionId,
int wishListId)
The wish list referenced by wishListId and all of the items contained by the wish list, will be deleted. |
void |
deleteWishListWithOptions(java.lang.String sessionId,
int wishListId,
AddToWishListOptionsIf options)
The wish list referenced by wishListId and all of the items contained by the wish list, will be deleted. |
void |
editWishList(java.lang.String sessionId,
WishListIf wishList)
Edit an existing wish list object. |
void |
editWishListWithOptions(java.lang.String sessionId,
WishListIf wishList,
AddToWishListOptionsIf options)
Edit an existing wish list object. |
protected int |
getCount(org.apache.torque.util.Criteria c)
This method is mainly used for paging. |
protected int |
getCustomerId(java.lang.String sessionId,
int customerId)
If the sessionId is null, we check the customerId to ensure that it is negative. |
WishList |
getWishList(int wishListId)
Get a wish list object for its id. |
WishList |
getWishList(java.lang.String sessionId,
int wishListId)
Get a wish list object for its id. |
protected WishListItem |
getWishListItem(int wishListItemId)
Get a wish list item object for its id. |
protected WishListItem |
getWishListItemPerEncodedProductAndWishList(int wishListId,
java.lang.String encodedProduct)
This is used to see if a product that we are adding to the wish list already exists in it |
WishListItems |
getWishListItems(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int wishListId,
int languageId)
Returns a WishListItems object containing an array of items and the number of items returned. |
WishListItems |
getWishListItemsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int wishListId,
int languageId,
AddToWishListOptionsIf options)
Returns a WishListItems object containing an array of items and the number of items returned. |
WishList |
getWishListWithItems(java.lang.String sessionId,
int wishListId,
int languageId)
Returns a fully populated WishList object that may contain an array of WishListItem objects. |
WishList |
getWishListWithItemsWithOptions(java.lang.String sessionId,
int wishListId,
int languageId,
AddToWishListOptionsIf options)
Returns a fully populated WishList object that may contain an array of WishListItem objects. |
protected com.konakart.bl.WishListMgr.WishListAndCriteria |
getWishListWithItemsWithOptionsPrivate(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int wishListId,
int languageId,
AddToWishListOptionsIf options)
Protected method to get wish list items for all cases |
WishList |
getWishListWithOptions(java.lang.String sessionId,
int wishListId,
AddToWishListOptionsIf options)
Get a wish list object for its id. |
protected void |
manageDataDescriptor(DataDescriptorIf dataDesc,
org.apache.torque.util.Criteria c)
Provides common code to deal with the management of the DataDescriptor |
void |
mergeWishListsWithOptions(java.lang.String sessionId,
int customerFromId,
int languageId,
AddToWishListOptionsIf options)
Add all items from the wish list of customerFrom to the wish list of customerTo which is retrieved from the sessionId. |
protected void |
populateOptsForWishListItem(WishListItem item,
int priceId,
int languageId,
AddToWishListOptionsIf a2wOptions)
The kk_wishlist_item 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. |
protected void |
populateWishListWithCustomerInfo(WishListIf wishList)
Populates the wish list object with information about the customer so that a customer can select a public wish list for a particular person. |
void |
removeFromWishList(java.lang.String sessionId,
int wishListItemId)
Remove the WishListItem object referenced by wishListItemId. |
void |
removeFromWishListWithOptions(java.lang.String sessionId,
int wishListItemId,
AddToWishListOptionsIf options)
Remove the WishListItem object referenced by wishListItemId. |
WishLists |
searchForWishLists(java.lang.String sessionId,
DataDescriptorIf dataDesc,
CustomerSearchIf customerSearch)
All wish lists matching the search criteria will be returned. |
protected void |
setWishListCriteriaWithStandardAttributes(KKCriteria c)
Common code to avoid duplication |
protected void |
setWishListItemCriteriaWithStandardAttributes(KKCriteria c)
Common code to avoid duplication |
void |
updateWishListItemQuantityBought(int wishListItemId,
int quantityBought)
Updates the wishListItem quantity received attribute by adding quantityBought to the actual value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public WishListMgr(KKEngIf eng)
throws java.lang.Exception
eng -
java.lang.Exception| Method Detail |
|---|
public int createWishList(java.lang.String sessionId,
WishListIf wishList)
throws java.lang.Exception
getWishListWithItems() can be called to add wish list items to the wish list.
The compulsory attributes for the WishListItem are:
createWishList in interface WishListMgrIfsessionId - wishList -
java.lang.Exception
public int createWishListWithOptions(java.lang.String sessionId,
WishListIf wishList,
AddToWishListOptionsIf options)
throws java.lang.Exception
getWishListWithItems() can be called to add wish list items to the wish list.
This method may be called even when a customer isn't logged in. In this case the
customerId attribute of the options object must be set to the id of the
temporary customer which is negative. The compulsory attributes for the WishListItem are:
createWishListWithOptions in interface WishListMgrIfsessionId - wishList - options -
java.lang.Exception
public void editWishList(java.lang.String sessionId,
WishListIf wishList)
throws java.lang.Exception
editWishList in interface WishListMgrIfsessionId - wishList -
java.lang.Exception
public void editWishListWithOptions(java.lang.String sessionId,
WishListIf wishList,
AddToWishListOptionsIf options)
throws java.lang.Exception
editWishListWithOptions in interface WishListMgrIfsessionId - The session id of the logged in userwishList - The wish list to be editedoptions -
java.lang.Exception
public int addToWishList(java.lang.String sessionId,
WishListItemIf wishListItem)
throws java.lang.Exception
addToWishList in interface WishListMgrIfsessionId - wishListItem -
java.lang.Exception
public int addToWishListWithOptions(java.lang.String sessionId,
WishListItemIf wishListItem,
AddToWishListOptionsIf options)
throws java.lang.Exception
addToWishListWithOptions in interface WishListMgrIfsessionId - wishListItem - options -
java.lang.Exception
public void removeFromWishList(java.lang.String sessionId,
int wishListItemId)
throws java.lang.Exception
removeFromWishList in interface WishListMgrIfsessionId - wishListItemId -
java.lang.Exception
public void removeFromWishListWithOptions(java.lang.String sessionId,
int wishListItemId,
AddToWishListOptionsIf options)
throws java.lang.Exception
removeFromWishListWithOptions in interface WishListMgrIfsessionId - wishListItemId - options -
java.lang.Exception
public void deleteWishList(java.lang.String sessionId,
int wishListId)
throws java.lang.Exception
deleteWishList in interface WishListMgrIfsessionId - wishListId -
java.lang.Exception
public void deleteWishListWithOptions(java.lang.String sessionId,
int wishListId,
AddToWishListOptionsIf options)
throws java.lang.Exception
deleteWishListWithOptions in interface WishListMgrIfsessionId - wishListId - options -
java.lang.Exception
public void mergeWishListsWithOptions(java.lang.String sessionId,
int customerFromId,
int languageId,
AddToWishListOptionsIf options)
throws java.lang.Exception
The currently logged in customer may have more than one wish list. The one used is the first one found of listType == 0.
mergeWishListsWithOptions in interface WishListMgrIfsessionId - customerFromId - languageId - options -
java.lang.Exception
public WishLists searchForWishLists(java.lang.String sessionId,
DataDescriptorIf dataDesc,
CustomerSearchIf customerSearch)
throws java.lang.Exception
getWishListWithItems() method, passing it the id of the wish list. This will
also populate the final price attributes of the wish list.
searchForWishLists in interface WishListMgrIfsessionId - The session id of the logged in user. It may be null if the user isn't logged in.dataDesc - customerSearch -
java.lang.Exception
protected int getCount(org.apache.torque.util.Criteria c)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
c -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public WishList getWishListWithItems(java.lang.String sessionId,
int wishListId,
int languageId)
throws java.lang.Exception
product attribute and populated
opts attribute if the WishListItem contains options. The items will be ordered
by priority with the highest priority first.
getWishListWithItems in interface WishListMgrIfsessionId - The session id of the logged in user. It may be null if the user isn't logged in.wishListId - languageId -
java.lang.Exception
public WishList getWishListWithItemsWithOptions(java.lang.String sessionId,
int wishListId,
int languageId,
AddToWishListOptionsIf options)
throws java.lang.Exception
product attribute and populated
opts attribute if the WishListItem contains options. The items will be ordered
by priority with the highest priority first.
If options is set to null, this method is identical to getWishListWithItems(). Otherwise the
functionality differs depending on the combination of options set.
getWishListWithItemsWithOptions in interface WishListMgrIfsessionId - The session id of the logged in user. It may be null if the user isn't logged in.wishListId - languageId - options -
java.lang.Exception
public WishListItems getWishListItemsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int wishListId,
int languageId,
AddToWishListOptionsIf options)
throws java.lang.Exception
dataDesc, the following functionality may
be controlled :
onlyShowAvailable attribute of the options object is set, then the wish
list items that have quantity received equal to quantity desired, are not returned.
getWishListItemsWithOptions in interface WishListMgrIfsessionId - The session id of the logged in user. It may be null if the user isn't logged in.dataDesc - wishListId - languageId - options -
java.lang.Exception
public WishListItems getWishListItems(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int wishListId,
int languageId)
throws java.lang.Exception
dataDesc, the following functionality may
be controlled :
getWishListItems in interface WishListMgrIfsessionId - The session id of the logged in user. It may be null if the user isn't logged in.dataDesc - wishListId - languageId -
java.lang.Exception
protected com.konakart.bl.WishListMgr.WishListAndCriteria getWishListWithItemsWithOptionsPrivate(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int wishListId,
int languageId,
AddToWishListOptionsIf options)
throws java.lang.Exception
sessionId - dataDesc - wishListId - languageId - options -
java.lang.Exception
protected void checkWishListItemOptions(WishListItem wli)
throws java.lang.Exception
wli -
java.lang.Exception
protected WishListItem getWishListItemPerEncodedProductAndWishList(int wishListId,
java.lang.String encodedProduct)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
wishListId - encodedProduct -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public WishList getWishList(java.lang.String sessionId,
int wishListId)
throws java.lang.Exception
getWishList in interface WishListMgrIfsessionId - wishListId -
java.lang.Exception
public WishList getWishListWithOptions(java.lang.String sessionId,
int wishListId,
AddToWishListOptionsIf options)
throws java.lang.Exception
getWishListWithOptions in interface WishListMgrIfsessionId - wishListId - options -
java.lang.Exception
public WishList getWishList(int wishListId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
getWishList in interface WishListMgrIfwishListId -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
protected void populateWishListWithCustomerInfo(WishListIf wishList)
throws java.lang.Exception
wishList -
java.lang.Exception
protected WishListItem getWishListItem(int wishListItemId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
wishListItemId -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetExceptionprotected void setWishListCriteriaWithStandardAttributes(KKCriteria c)
c - protected void setWishListItemCriteriaWithStandardAttributes(KKCriteria c)
c -
protected void populateOptsForWishListItem(WishListItem item,
int priceId,
int languageId,
AddToWishListOptionsIf a2wOptions)
throws java.lang.Exception
item - priceId - languageId - a2wOptions -
java.lang.Exceptionprotected FetchProductOptionsIf createFetchProductOptions(AddToWishListOptionsIf options)
options -
public void updateWishListItemQuantityBought(int wishListItemId,
int quantityBought)
throws java.lang.Exception
updateWishListItemQuantityBought in interface WishListMgrIfwishListItemId - quantityBought -
java.lang.Exception
protected void manageDataDescriptor(DataDescriptorIf dataDesc,
org.apache.torque.util.Criteria c)
dataDesc - c -
protected int getCustomerId(java.lang.String sessionId,
int customerId)
throws java.lang.Exception
sessionId - customerId -
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||