|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.al.BaseMgr
com.konakart.al.ProductMgr
public class ProductMgr
Contains methods to fetch and manage lists of products and keeps track of the current selected product.
| Field Summary |
|---|
| Fields inherited from class com.konakart.al.BaseMgr |
|---|
eng, kkAppEng, log |
| Constructor Summary | |
|---|---|
protected |
ProductMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
Constructor. |
| Method Summary | |
|---|---|
void |
fetchAllNewProds()
Gets a list of latest products from the engine and puts them in the currentProducts array. |
void |
fetchAllSpecials()
Gets a list of specials from the engine and puts them in the currentProducts array. |
void |
fetchAlsoPurchasedArray()
Populates the alsoPurchasedArray array. |
com.konakart.appif.DigitalDownloadIf[] |
fetchDigitalDownloads()
The method is called to get the digital downloads from the DB for this user. |
int |
fetchManufacturersPerCategory(int catId)
The method is called to populate the drop list of manufacturers in the page that shows a list of products for a category. |
void |
fetchNewProductsArray(int categoryId)
Get the latest products added to the catalog for the category whose id is passed in as a parameter. |
void |
fetchOrderHistoryArray()
Populates the orderHistory array for the current logged in user. |
int |
fetchProductsPerCategory(com.konakart.appif.CategoryIf cat)
Retrieves the products for a selected category. |
void |
fetchProductsPerManufacturer(int manufacturerId)
This method is called in order to retrieve a list of products in the currentProducts array belonging to a specific manufacturer. |
void |
fetchRelatedProducts()
Fetches the related products from the DB. |
void |
fetchSelectedProduct(int prodId)
This method is called when a user selects a product in order to retrieve more details for that product. |
int |
fetchTagGroupsPerCategory(int catId)
The method is called to populate the currentTagGroups array. |
void |
filterCurrentProdsByCategory(int categoryId)
This method is called in order to filter a list of products in the currentProducts array and show only the products belonging to a specific category. |
void |
filterCurrentProdsByManufacturer(int manufacturerId)
This method is called in order to filter a list of products in the currentProducts array and show only the products belonging to a specific manufacturer. |
void |
filterCurrentProdsByTags(int tagId)
If the tag isn't currently selected, then it will be added to the product filter. |
com.konakart.appif.ProductIf[] |
getAccessories()
|
com.konakart.appif.ManufacturerIf[] |
getAllManuArray()
Returns an array containing all of the manufacturers. |
DropListElement[] |
getAllManuDropList()
Returns the static list of all manufacturers |
com.konakart.appif.ProductIf[] |
getAlsoPurchased()
Returns the alsoPurchased array of products. |
com.konakart.appif.ProductIf[] |
getBestSellers()
Gets best sellers for the current category. |
com.konakart.appif.ProductIf[] |
getBundledProducts()
|
com.konakart.appif.ProductIf[] |
getCrossSellProducts()
|
com.konakart.appif.CategoryIf[] |
getCurrentCategories()
Returns the currentCategories. |
int |
getCurrentCategoriesLength()
Returns the length of the currentCategories array |
com.konakart.appif.ManufacturerIf[] |
getCurrentManufacturers()
Returns the currentManufacturers. |
int |
getCurrentManufacturersLength()
Returns the length of the currentManufacturers array |
int |
getCurrentOffset()
The current offset in the list of products. |
com.konakart.appif.ProductIf[] |
getCurrentProducts()
Returns the currentProducts. |
com.konakart.appif.TagGroupIf[] |
getCurrentTagGroups()
|
com.konakart.appif.DataDescriptorIf |
getDataDesc()
|
java.lang.String |
getDefaultOrderBy()
Used to set the default OrderBy used by many of the API calls to fetch products. |
com.konakart.appif.ProductIf[] |
getDependentProducts()
|
com.konakart.appif.DigitalDownloadIf[] |
getDigitalDownloads()
|
java.lang.String |
getHeaderToShow()
The page of the application showing products can have many different titles and can also contain a filter to filter the products by manufacturer or by category. |
int |
getMaxRows()
Maximum number of products 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. |
com.konakart.appif.ProductIf[] |
getNewProducts()
Returns an array of products containing the new products. |
int |
getNumberOfProducts()
Returns the number of products in the currentProducts array. |
int |
getNumRandomNewProds()
Returns the number of random new products |
int |
getNumRandomSpecials()
Returns the number of random specials |
java.lang.String |
getObCustom1()
|
java.lang.String |
getObCustom2()
|
java.lang.String |
getObCustom3()
|
java.lang.String |
getObCustom4()
|
java.lang.String |
getObCustom5()
|
java.lang.String |
getObDate()
Static string - order by date. |
java.lang.String |
getObManufacturer()
Static string - order by manufacturer. |
java.lang.String |
getObName()
Static string - order by name. |
java.lang.String |
getObPrice()
Static string - order by price. |
java.lang.String |
getObRating()
Static string - order by rating. |
java.lang.String |
getObRead()
Static string - order by how many times it has been read. |
java.lang.String |
getObViewed()
Static string - order by how many times it has been viewed. |
com.konakart.appif.ProductIf[] |
getOrderHistory()
Returns the orderHistory array of products. |
com.konakart.appif.ProductIf |
getRandomNewProd()
A random product is returned . |
com.konakart.appif.ProductIf |
getRandomSpecial()
A random product (with a special price) is returned . |
com.konakart.appif.CategoryIf |
getSelectedCategory()
Returns the selectedCategory. |
com.konakart.appif.ManufacturerIf |
getSelectedManufacturer()
Returns the selectedManufacturer. |
com.konakart.appif.ProductIf |
getSelectedProduct()
Returns the selectedProduct. |
java.util.List |
getSelectedProductOptions()
Returns the selectedProductOptions. |
int |
getShowBack()
Show the back button if set to 1. |
int |
getShowNext()
Show the next button if set to 1. |
java.lang.String |
getSTOCK_ALLOW_CHECKOUT()
Determine whether to allow a customer to checkout if product isn't in stock. |
java.lang.String |
getSTOCK_CHECK()
Determine whether to check to see if product is in stock |
com.konakart.appif.TagGroupIf[] |
getTagGroupFilter()
Get an array of TagGroups with the tags to filter by |
int |
getTotalNumberOfProducts()
Returns the totalNumberOfProducts. |
com.konakart.appif.ProductIf[] |
getUpSellProducts()
|
boolean |
isCurrentProductANotification()
If a customer is logged in, it returns true if he is already being notified about the selected product. |
void |
navigateCurrentProducts(java.lang.String navDir)
This method is called to navigate through a list of products when the list is longer than maxRows. |
void |
orderCurrentProds(java.lang.String orderBy)
This method is called to change the order of a list of products in the currentProducts array. |
void |
refreshCaches()
Refreshes the following; Random new product list All manufacturer list Random Specials list |
void |
refreshConfigs()
Refresh the configuration variables. |
void |
removeAllTagsFromFilter()
Removes all selected tags from the current filter. |
void |
reset()
Puts the Product Manager back into it's original state with no products selected |
int |
searchForProducts(com.konakart.appif.ProductSearchIf ps)
Retrieves the products that match the criteria in a ProductSearch object and puts them in the currentProducts array. |
void |
setDataDesc(com.konakart.appif.DataDescriptorIf dataDesc)
|
void |
setDefaultOrderBy(java.lang.String defaultOrderBy)
Used to set the default OrderBy used by many of the API calls to fetch products. |
void |
setDigitalDownloads(com.konakart.appif.DigitalDownloadIf[] digitalDownloads)
|
void |
setOrderHistory(com.konakart.appif.ProductIf[] orderHistory)
|
void |
updateProductViewedCount(int productId)
Update the number of times that the product has been viewed |
| Methods inherited from class com.konakart.al.BaseMgr |
|---|
getEng, getKkAppEng, setEng, setKkAppEng |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ProductMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
throws com.konakart.app.KKException
eng - kkAppEng -
com.konakart.app.KKException| Method Detail |
|---|
public void refreshConfigs()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void reset()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void refreshCaches()
throws com.konakart.app.KKException
com.konakart.app.KKException
public int fetchProductsPerCategory(com.konakart.appif.CategoryIf cat)
throws com.konakart.app.KKException,
KKAppException
cat - The selected category
com.konakart.app.KKException
KKAppException
public void fetchAllSpecials()
throws com.konakart.app.KKException,
KKAppException
com.konakart.app.KKException
KKAppException
public void fetchAllNewProds()
throws com.konakart.app.KKException,
KKAppException
com.konakart.app.KKException
KKAppException
public int searchForProducts(com.konakart.appif.ProductSearchIf ps)
throws com.konakart.app.KKException,
KKAppException
ps - ProductSearch object containing the search criteria
com.konakart.app.KKException
KKAppException
public int fetchManufacturersPerCategory(int catId)
throws com.konakart.app.KKException
catId - The id of the selected category
com.konakart.app.KKException
public void orderCurrentProds(java.lang.String orderBy)
throws com.konakart.app.KKException,
KKAppException
orderBy - The order by parameter
com.konakart.app.KKException
KKAppException
public void filterCurrentProdsByManufacturer(int manufacturerId)
throws com.konakart.app.KKException,
KKAppException
manufacturerId - The id of the manufacturer
com.konakart.app.KKException
KKAppException
public void filterCurrentProdsByTags(int tagId)
throws com.konakart.app.KKException,
KKAppException
tagId - The numeric id of the Tag object
com.konakart.app.KKException
KKAppException
public void removeAllTagsFromFilter()
throws com.konakart.app.KKException,
KKAppException
com.konakart.app.KKException
KKAppException
public void filterCurrentProdsByCategory(int categoryId)
throws com.konakart.app.KKException,
KKAppException
categoryId - The id of the category
com.konakart.app.KKException
KKAppException
public void fetchProductsPerManufacturer(int manufacturerId)
throws com.konakart.app.KKException,
KKAppException
manufacturerId - The id of the manufacturer
com.konakart.app.KKException
KKAppException
public void navigateCurrentProducts(java.lang.String navDir)
throws com.konakart.app.KKException,
KKAppException
navDir can take the following values which are retrieved using getter methods
on the ProductMgr instance:
navDir - The navigation direction.
com.konakart.app.KKException
KKAppException
public void fetchSelectedProduct(int prodId)
throws com.konakart.app.KKException,
KKAppException
prodId - The id of the product
com.konakart.app.KKException
KKAppExceptionpublic int getNumberOfProducts()
public com.konakart.appif.ProductIf getRandomSpecial()
public com.konakart.appif.ProductIf getRandomNewProd()
public void fetchOrderHistoryArray()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void fetchAlsoPurchasedArray()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void fetchRelatedProducts()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void fetchNewProductsArray(int categoryId)
throws com.konakart.app.KKException
categoryId - The id of the selected category
com.konakart.app.KKException
public boolean isCurrentProductANotification()
throws com.konakart.app.KKException
com.konakart.app.KKException
public com.konakart.appif.ProductIf[] getBestSellers()
throws com.konakart.app.KKException
com.konakart.app.KKException
public com.konakart.appif.DigitalDownloadIf[] fetchDigitalDownloads()
throws com.konakart.app.KKException
com.konakart.app.KKException
public int fetchTagGroupsPerCategory(int catId)
throws com.konakart.app.KKException
currentTagGroups array. If there are any
tag groups associated with this category, the tags will be displayed on the UI to allow the
customer to refine his product search.
catId - The id of the selected category
com.konakart.app.KKException
public com.konakart.appif.TagGroupIf[] getTagGroupFilter()
throws com.konakart.app.KKException
com.konakart.app.KKExceptionpublic java.lang.String getSTOCK_ALLOW_CHECKOUT()
public java.lang.String getSTOCK_CHECK()
public void updateProductViewedCount(int productId)
throws com.konakart.app.KKException
productId -
com.konakart.app.KKExceptionpublic DropListElement[] getAllManuDropList()
public com.konakart.appif.ManufacturerIf[] getCurrentManufacturers()
public int getCurrentManufacturersLength()
public com.konakart.appif.ProductIf[] getCurrentProducts()
public com.konakart.appif.CategoryIf getSelectedCategory()
public int getShowBack()
public int getShowNext()
public int getMaxRows()
public int getCurrentOffset()
public 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 java.lang.String getObDate()
public java.lang.String getObManufacturer()
public java.lang.String getObName()
public java.lang.String getObPrice()
public java.lang.String getObRating()
public java.lang.String getObRead()
public java.lang.String getObViewed()
public com.konakart.appif.ProductIf getSelectedProduct()
public java.util.List getSelectedProductOptions()
public com.konakart.appif.CategoryIf[] getCurrentCategories()
public int getCurrentCategoriesLength()
public com.konakart.appif.ManufacturerIf getSelectedManufacturer()
public java.lang.String getHeaderToShow()
public int getTotalNumberOfProducts()
public com.konakart.appif.ProductIf[] getOrderHistory()
public com.konakart.appif.ProductIf[] getAlsoPurchased()
public com.konakart.appif.ProductIf[] getNewProducts()
public com.konakart.appif.ManufacturerIf[] getAllManuArray()
public int getNumRandomSpecials()
public int getNumRandomNewProds()
public com.konakart.appif.ProductIf[] getAccessories()
public com.konakart.appif.ProductIf[] getCrossSellProducts()
public com.konakart.appif.ProductIf[] getDependentProducts()
public com.konakart.appif.ProductIf[] getUpSellProducts()
public com.konakart.appif.DigitalDownloadIf[] getDigitalDownloads()
public void setDigitalDownloads(com.konakart.appif.DigitalDownloadIf[] digitalDownloads)
digitalDownloads - The digitalDownloads to set.public com.konakart.appif.DataDescriptorIf getDataDesc()
public void setDataDesc(com.konakart.appif.DataDescriptorIf dataDesc)
dataDesc - The dataDesc to set.public java.lang.String getObCustom1()
public java.lang.String getObCustom2()
public java.lang.String getObCustom3()
public java.lang.String getObCustom4()
public java.lang.String getObCustom5()
public java.lang.String getDefaultOrderBy()
public void setDefaultOrderBy(java.lang.String defaultOrderBy)
defaultOrderBy - The defaultOrderBy to set.public com.konakart.appif.ProductIf[] getBundledProducts()
public void setOrderHistory(com.konakart.appif.ProductIf[] orderHistory)
orderHistory - The orderHistory to set.public com.konakart.appif.TagGroupIf[] getCurrentTagGroups()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||