public class CategoryMgr extends BaseMgr
Modifier | Constructor and Description |
---|---|
protected |
CategoryMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
createPrivateCategoryStructures()
When a customer logs in, we may assign a catalog to the customer in a B2B scenario.
|
protected void |
fetchCategoryTree()
Fetch the category tree from the engine for all languages
|
DropListElement[] |
getAllCatsDropList()
This is only used for advanced product search so we can create it every time in the correct
language.
|
protected java.util.HashMap<java.lang.Integer,com.konakart.appif.CategoryIf> |
getCategoryMap()
Returns the category map.
|
protected com.konakart.appif.CategoryIf[] |
getCategoryTree()
Returns the category tree.
|
com.konakart.appif.CategoryIf |
getCatFromId(int catId)
It returns the category from a hash map
|
java.util.List<com.konakart.appif.CategoryIf> |
getCatMenuList(com.konakart.appif.CategoryIf selectedCat)
Method that creates a new category menu list for a selected category.
|
java.util.List<com.konakart.appif.CategoryIf> |
getCatMenuList(com.konakart.appif.CategoryIf[] catArray)
Method that creates a new category menu list for an array of selected categories which may be
returned as facets after a search.
|
java.util.List<com.konakart.appif.CategoryIf> |
getCatMenuList(com.konakart.appif.CategoryIf _selectedCat,
boolean getChildren)
Method that creates a new category menu list for a selected category.
|
com.konakart.appif.CategoryIf[] |
getCats()
Returns the category tree (i.e.
|
com.konakart.appif.CategoryIf |
getCurrentCat()
Returns the category that is currently selected in the UI.
|
boolean |
isMgrReady()
Is the Manager Ready?
|
boolean |
isShowCounts()
Determine whether to show the number of products per category.
|
void |
refreshCaches()
Refreshes the all categories list.
|
void |
refreshConfigs()
Refresh the configuration variables.
|
void |
reset()
Puts the Category Manager back into it's original state with no categories selected
|
protected void |
resetPrivateCategoryStructures()
Set the private category structures to null when the customer logs out
|
java.util.List<com.konakart.appif.CategoryIf> |
setCurrentCat(int catId)
Creates a category menu list so that the facets tile can display the correct information.
|
int |
setCurrentCatAndUpdateProducts(int catId,
com.konakart.app.ProductSearch ps)
Sets
currentCat . |
getEng, getKkAppEng, getPages, setEng, setKkAppEng
protected CategoryMgr(com.konakart.appif.KKEngIf eng, KKAppEng kkAppEng) throws com.konakart.app.KKException, KKAppException
eng
- the engkkAppEng
- the kkAppEngKKAppException
- an unexpected KKAppException exceptioncom.konakart.app.KKException
- an unexpected KKException exceptionpublic void refreshConfigs() throws com.konakart.app.KKException, KKAppException
com.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void refreshCaches() throws com.konakart.app.KKException, KKAppException
com.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic boolean isMgrReady()
isMgrReady
in class BaseMgr
protected void fetchCategoryTree() throws com.konakart.app.KKException, KKAppException
com.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void reset()
public int setCurrentCatAndUpdateProducts(int catId, com.konakart.app.ProductSearch ps) throws com.konakart.app.KKException, KKAppException
currentCat
. If the selected category is a leaf node then the ProductMgr
object is updated with the relative product and manufacturer information for the category.
i.e. The manufacturers and products for that category are fetched from the server.catId
- The category id of the selected categoryps
- productSearch objectcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic com.konakart.appif.CategoryIf getCatFromId(int catId)
catId
- the catIdpublic java.util.List<com.konakart.appif.CategoryIf> setCurrentCat(int catId) throws KKAppException
catId
- The numeric id of the current categoryKKAppException
- an unexpected KKAppException exceptionpublic java.util.List<com.konakart.appif.CategoryIf> getCatMenuList(com.konakart.appif.CategoryIf selectedCat)
selectedCat
- the selectedCatpublic java.util.List<com.konakart.appif.CategoryIf> getCatMenuList(com.konakart.appif.CategoryIf _selectedCat, boolean getChildren)
_selectedCat
- the _selectedCatgetChildren
- Displays children when setpublic java.util.List<com.konakart.appif.CategoryIf> getCatMenuList(com.konakart.appif.CategoryIf[] catArray)
catArray
- the catArraypublic boolean isShowCounts()
public com.konakart.appif.CategoryIf[] getCats()
public com.konakart.appif.CategoryIf getCurrentCat()
public DropListElement[] getAllCatsDropList()
protected void createPrivateCategoryStructures() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionprotected void resetPrivateCategoryStructures()
protected com.konakart.appif.CategoryIf[] getCategoryTree()
protected java.util.HashMap<java.lang.Integer,com.konakart.appif.CategoryIf> getCategoryMap()
Copyright © 2018 DS Data Systems UK Ltd.