public interface AdminCategoryMgrIf
| Modifier and Type | Method and Description |
|---|---|
void |
deleteCategoryTree(int categoryId,
int options)
Delete the category referenced to by categoryId.
|
void |
deleteSingleCategory(int categoryId)
Delete a single category.
|
boolean |
doesCategoryExist(int categoryId)
Return true if the category exists.
|
boolean |
doesCategoryExist(int categoryId,
java.sql.Connection con)
Return true if the category exists.
|
void |
editCategory(AdminCategory cat)
Edit the category.
|
AdminCategory[] |
getAllCategories(int languageId)
Returns an array of all categories sparsely-populated with Id and name (in the specified
language) only.
|
AdminCategory[] |
getAllCategoryImages()
Returns an array of all categories sparsely-populated with Id and image name only.
|
AdminCategory[] |
getCategoriesPerProduct(int productId,
int languageId)
Returns all of the categories that the product belongs to.
|
AdminCategory[] |
getCategoriesPerPromotion(int promotionId,
int languageId)
Returns all of the categories for the promotion
|
int[] |
getCategoriesPerTagGroup(int tagGroupId)
Return an array of Category Ids linked to the specified tag group.
|
AdminCategoryToTagGroup[] |
getCategoriesToTagGroups()
Return an array of all of the AdminCategoryToTagGroup records.
|
AdminCategory |
getCategory(int categoryId,
boolean getChildren,
int languageId) |
AdminCategory |
getCategory(int categoryId,
boolean getChildren,
int languageId,
java.sql.Connection con) |
AdminCategory |
getCategory(int categoryId,
boolean getChildren,
int languageId,
java.lang.String storeId) |
AdminCategory |
getCategory(int categoryId,
boolean getChildren,
int languageId,
java.lang.String storeId,
java.sql.Connection con) |
AdminCategory |
getCategoryFromCache(int catId,
int languageId)
It returns the category from a hash map created when building the category tree.
|
int |
getCategoryLevel(AdminCategory cat)
Method that calculates the level of the category where 0 is the top level, 1 is the first
child level etc.
|
AdminCategory[] |
getCategoryTree(int languageId,
boolean getNumProducts)
Returns an array of top level categories each of which includes an array of child categories
etc.
|
AdminCategory[] |
getCategoryTreeFlattenedList(AdminCategory[] catTree)
Creates an array of all categories from the Category Tree specified.
|
AdminCategory[] |
getCategoryTreeFromCache(int languageId)
It returns the category tree from the cache.
|
int[] |
getChildren(int categoryId)
Returns an array of categoryId describing the children of the given category.
|
AdminCategory[] |
getTopLevelCategories(int languageId,
AdminDataDescriptor dataDesc)
Returns all of the top level categories which are those that have a parentId = 0.
|
int |
insertCategory(AdminCategory cat)
Insert a category as a child of the parent category.
|
void |
moveCategory(int categoryId,
int newParentId)
Move this category to make it a child of the category identified by newParentId
|
AdminCategory[] getCategoryTree(int languageId, boolean getNumProducts) throws java.lang.Exception
Each Category class contains a field that describes how many products exist for that
category. This field is calculated if getNumProducts is set to true.
languageId - the languageIdgetNumProducts - the getNumProductsjava.lang.Exception - an unexpected exceptionAdminCategory[] getCategoryTreeFlattenedList(AdminCategory[] catTree)
catTree - the catTreeAdminCategory[] getAllCategories(int languageId) throws java.lang.Exception
languageId - the languageIdjava.lang.Exception - an unexpected exceptionAdminCategory[] getAllCategoryImages() throws java.lang.Exception
java.lang.Exception - an unexpected exceptionAdminCategory[] getTopLevelCategories(int languageId, AdminDataDescriptor dataDesc) throws java.lang.Exception
languageId - the languageIddataDesc - the dataDescjava.lang.Exception - an unexpected exceptionint[] getChildren(int categoryId)
throws java.lang.Exception
categoryId - the categoryIdjava.lang.Exception - an unexpected exceptionAdminCategory getCategory(int categoryId, boolean getChildren, int languageId) throws java.lang.Exception
categoryId - the categoryIdgetChildren - If true we get all of the children. Children don't have an array of descriptions.languageId - Needed to determine the language Id of the childrenjava.lang.Exception - an unexpected exceptionAdminCategory getCategory(int categoryId, boolean getChildren, int languageId, java.sql.Connection con) throws java.lang.Exception
categoryId - the categoryIdgetChildren - If true we get all of the children. Children don't have an array of descriptions.languageId - Needed to determine the language Id of the childrencon - Connection for transactionjava.lang.Exception - an unexpected exceptionAdminCategory getCategory(int categoryId, boolean getChildren, int languageId, java.lang.String storeId) throws java.lang.Exception
categoryId - the categoryIdgetChildren - If true we get all of the children. Children don't have an array of descriptions.languageId - Needed to determine the language Id of the childrenstoreId - The store idjava.lang.Exception - an unexpected exceptionAdminCategory getCategory(int categoryId, boolean getChildren, int languageId, java.lang.String storeId, java.sql.Connection con) throws java.lang.Exception
categoryId - the categoryIdgetChildren - If true we get all of the children. Children don't have an array of descriptions.languageId - Needed to determine the language Id of the childrenstoreId - The store idcon - Connection for transactionjava.lang.Exception - an unexpected exceptionAdminCategory getCategoryFromCache(int catId, int languageId) throws java.lang.Exception
catId - the catIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionAdminCategory[] getCategoryTreeFromCache(int languageId) throws java.lang.Exception
languageId - the languageIdjava.lang.Exception - an unexpected exceptionint getCategoryLevel(AdminCategory cat) throws java.lang.Exception
cat - the catjava.lang.Exception - an unexpected exceptionboolean doesCategoryExist(int categoryId)
throws org.apache.torque.TorqueException,
KKAdminException
categoryId - the categoryIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin engineboolean doesCategoryExist(int categoryId,
java.sql.Connection con)
throws org.apache.torque.TorqueException,
KKAdminException
categoryId - the categoryIdcon - Connection for transactionorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin engineint insertCategory(AdminCategory cat) throws java.lang.Exception
cat - the catjava.lang.Exception - an unexpected exceptionvoid editCategory(AdminCategory cat) throws java.lang.Exception
cat - the catjava.lang.Exception - an unexpected exceptionvoid deleteCategoryTree(int categoryId,
int options)
throws java.lang.Exception
categoryId - the categoryIdoptions - the optionsjava.lang.Exception - an unexpected exceptionvoid deleteSingleCategory(int categoryId)
throws java.lang.Exception
categoryId - the categoryIdjava.lang.Exception - an unexpected exceptionvoid moveCategory(int categoryId,
int newParentId)
throws java.lang.Exception
categoryId - the categoryIdnewParentId - the newParentIdjava.lang.Exception - an unexpected exceptionAdminCategory[] getCategoriesPerPromotion(int promotionId, int languageId) throws java.lang.Exception
promotionId - the promotionIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionint[] getCategoriesPerTagGroup(int tagGroupId)
throws java.lang.Exception
tagGroupId - The Id of the tag Groupjava.lang.Exception - an unexpected exceptionAdminCategoryToTagGroup[] getCategoriesToTagGroups() throws java.lang.Exception
java.lang.Exception - an unexpected exceptionAdminCategory[] getCategoriesPerProduct(int productId, int languageId) throws java.lang.Exception
productId - the productIdlanguageId - the languageIdjava.lang.Exception - an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.