public class WishListMgr extends BaseMgr
Modifier and Type | Field and Description |
---|---|
static int |
BIRTHDAY_LIST_TYPE
Defines the type of wish list
|
static int |
WEDDING_LIST_TYPE
Defines the type of wish list
|
static int |
WISH_LIST_TYPE
Defines the type of wish list
|
Modifier | Constructor and Description |
---|---|
protected |
WishListMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addToWishList(com.konakart.appif.WishListItemIf item)
The WishListItem is added to one of the customer's wish lists.
|
boolean |
allowWishListWhenNotLoggedIn()
Returns true or false depending on whether wish lists are allowed for non logged in customers
|
int |
createWishList(com.konakart.appif.WishListIf wishList)
Creates a new wish list which will appear when
fetchCustomersWishLists() is
called. |
void |
deleteWishList(int wishListId)
The wish list referenced by the wishListId parameter, and all of its items will be deleted.
|
void |
editWishList(com.konakart.appif.WishListIf wishList)
The wish list passed in as a parameter will be edited.
The edited wish list will only appear on the UI only after fetchCustomersWishLists() is called. |
void |
fetchCustomersWishLists()
Get the wish list for a customer and language and set them on the customer object of the
customerMgr.
|
com.konakart.appif.WishListIf |
fetchWishList(int wishListId)
Gets a fully populated wish list from the engine and populates the
currentWishList attribute with it. |
com.konakart.appif.WishListIf |
fetchWishListWithoutItems(int wishListId)
Gets an empty wish list from the engine and populates the
currentWishList
attribute with it. |
com.konakart.appif.AddToWishListOptionsIf |
getAddToWishListOptions()
Creates an AddToWishListOptionsIf based on the current FetchProductOptions stored in the
AppEng.
|
int |
getCurrentItemOffset() |
int |
getCurrentItemPage() |
com.konakart.appif.WishListIf |
getCurrentWishList() |
com.konakart.appif.WishListItemIf[] |
getCurrentWishListItems() |
int |
getCurrentWishListOffset() |
int |
getCurrentWishListPage() |
com.konakart.appif.WishListIf[] |
getCurrentWishLists() |
java.util.ArrayList<java.lang.Integer> |
getItemPageList() |
int |
getItemShowBack()
Show the back button if set to 1.
|
int |
getItemShowNext()
Show the next button if set to 1.
|
int |
getMaxItemRows()
Maximum number of wish list items to show in a list.
|
int |
getMaxRows()
Maximum number of wish lists to show in a list.
|
java.lang.String |
getNavBack()
Static string - navigate backwards.
|
java.lang.String |
getNavNext()
Static string - navigate forwards.
|
java.lang.String |
getNavStart()
Static string - navigate to the start.
|
int |
getNumberOfWishListItems()
Returns the number of wish list items currently retrieved.
|
int |
getNumberOfWishLists()
Returns the number of wish lists currently retrieved.
|
int |
getNumItemPages() |
int |
getNumWishListPages() |
java.lang.String |
getObPriority() |
int |
getTotalNumberOfWishListItems() |
int |
getTotalNumberOfWishLists() |
java.util.ArrayList<java.lang.Integer> |
getWishListPageList() |
int |
getWishListShowBack()
Show the back button if set to 1.
|
int |
getWishListShowNext()
Show the next button if set to 1.
|
boolean |
isEnabled()
Based on a configuration variable decides whether wish lists are enabled.
|
void |
navigateCurrentWishListItems(java.lang.String navDir)
This method is called to navigate through a list of wish list items when the list is longer
than maxItemRows.
navDir can take the following values which are retrieved using getter methods on
the WishListMgr instance:
getNavNext()
getNavBack()
getNavStart()
|
void |
navigateCurrentWishLists(java.lang.String navDir)
This method is called to navigate through a list of wish lists when the list is longer than
maxRows.
navDir can take the following values which are retrieved using getter methods on
the WishListMgr instance:
getNavNext()
getNavBack()
getNavStart()
|
void |
orderCurrentWishListItems(java.lang.String orderBy)
This method is called to change the order of a list of wishlist items in the
currentWishListItems array.
|
void |
refreshConfigs()
Refresh the configuration variables.
|
void |
removeFromWishList(com.konakart.appif.WishListItemIf item)
The Wish List item is removed from the database and so no longer appears in the customer's
wish list when
fetchCustomersWishLists() is called. |
void |
reset()
Puts the WishListMgr object back into it's original state with no wish lists selected.
|
int |
searchForWishLists(com.konakart.appif.CustomerSearchIf _customerSearch)
The wish lists are fetched from the engine and put in the currentWishList array.
|
void |
setCurrentWishList(com.konakart.appif.WishListIf currentWishList) |
getEng, getKkAppEng, getPages, isMgrReady, setEng, setKkAppEng
public static final int WISH_LIST_TYPE
public static final int WEDDING_LIST_TYPE
public static final int BIRTHDAY_LIST_TYPE
protected WishListMgr(com.konakart.appif.KKEngIf eng, KKAppEng kkAppEng) throws com.konakart.app.KKException
eng
- the engkkAppEng
- the kkAppEngcom.konakart.app.KKException
- an unexpected KKException exceptionpublic void refreshConfigs() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionpublic void reset() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionpublic com.konakart.appif.WishListIf fetchWishList(int wishListId) throws com.konakart.app.KKException
currentWishList
attribute with it.wishListId
- the wishListIdcom.konakart.app.KKException
- an unexpected KKException exceptionpublic com.konakart.appif.WishListIf fetchWishListWithoutItems(int wishListId) throws com.konakart.app.KKException
currentWishList
attribute with it.wishListId
- the wishListIdcom.konakart.app.KKException
- an unexpected KKException exceptionpublic void fetchCustomersWishLists() throws com.konakart.app.KKException, KKAppException
com.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void removeFromWishList(com.konakart.appif.WishListItemIf item) throws com.konakart.app.KKException, KKAppException
fetchCustomersWishLists()
is called.item
- The wish list item to be removedcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic int createWishList(com.konakart.appif.WishListIf wishList) throws com.konakart.app.KKException, KKAppException
fetchCustomersWishLists()
is
called.wishList
- the wishListcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic int addToWishList(com.konakart.appif.WishListItemIf item) throws com.konakart.app.KKException, KKAppException
fetchCustomersWishLists()
is called.item
- the itemcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void deleteWishList(int wishListId) throws com.konakart.app.KKException, KKAppException
fetchCustomersWishLists()
is
called.wishListId
- the wishListIdcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void editWishList(com.konakart.appif.WishListIf wishList) throws com.konakart.app.KKException, KKAppException
fetchCustomersWishLists()
is called.wishList
- the wishListcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic boolean isEnabled() throws KKAppException
KKAppException
- an unexpected KKAppException exceptionpublic com.konakart.appif.AddToWishListOptionsIf getAddToWishListOptions()
public void navigateCurrentWishLists(java.lang.String navDir) throws com.konakart.app.KKException, KKAppException
navDir
can take the following values which are retrieved using getter methods on
the WishListMgr instance:
navDir
- The navigation directioncom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void navigateCurrentWishListItems(java.lang.String navDir) throws java.lang.Exception
navDir
can take the following values which are retrieved using getter methods on
the WishListMgr instance:
navDir
- The navigation directionjava.lang.Exception
- an unexpected exceptionpublic int searchForWishLists(com.konakart.appif.CustomerSearchIf _customerSearch) throws com.konakart.app.KKException, KKAppException
_customerSearch
- the _customerSearchcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void orderCurrentWishListItems(java.lang.String orderBy) throws java.lang.Exception
orderBy
- The order by parameterjava.lang.Exception
- an unexpected exceptionpublic com.konakart.appif.WishListIf getCurrentWishList()
public void setCurrentWishList(com.konakart.appif.WishListIf currentWishList)
currentWishList
- the currentWishList to setpublic java.lang.String getNavBack()
navdir
attribute when navigating backwards.public java.lang.String getNavNext()
navdir
attribute when navigating forwards.public java.lang.String getNavStart()
navdir
attribute when navigating to the start.public int getNumberOfWishLists()
public int getNumberOfWishListItems()
public boolean allowWishListWhenNotLoggedIn()
public int getTotalNumberOfWishLists()
public com.konakart.appif.WishListIf[] getCurrentWishLists()
public int getMaxRows()
public int getMaxItemRows()
public int getTotalNumberOfWishListItems()
public com.konakart.appif.WishListItemIf[] getCurrentWishListItems()
public java.lang.String getObPriority()
public int getNumWishListPages()
public int getNumItemPages()
public java.util.ArrayList<java.lang.Integer> getWishListPageList()
public java.util.ArrayList<java.lang.Integer> getItemPageList()
public int getWishListShowNext()
public int getWishListShowBack()
public int getItemShowNext()
public int getItemShowBack()
public int getCurrentWishListOffset()
public int getCurrentItemOffset()
public int getCurrentWishListPage()
public int getCurrentItemPage()
Copyright © 2018 DS Data Systems UK Ltd.