com.konakartadmin.blif
Interface AdminCategoryMgrIf

All Known Implementing Classes:
AdminCategoryMgr

public interface AdminCategoryMgrIf

AdminCategoryMgrIf


Method Summary
 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.
 void editCategory(AdminCategory cat)
          Edit the category.
 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.lang.String storeId)
           
 AdminCategory[] getCategoryTree(int languageId, boolean getNumProducts)
          Returns an array of top level categories each of which includes an array of child categories etc.
 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
 

Method Detail

getCategoryTree

AdminCategory[] getCategoryTree(int languageId,
                                boolean getNumProducts)
                                throws java.lang.Exception
Returns an array of top level categories each of which includes an array of child categories etc. so that the category tree structure can be navigated.

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.

Parameters:
languageId -
getNumProducts -
Returns:
Array of Category Objects
Throws:
java.lang.Exception

getTopLevelCategories

AdminCategory[] getTopLevelCategories(int languageId,
                                      AdminDataDescriptor dataDesc)
                                      throws java.lang.Exception
Returns all of the top level categories which are those that have a parentId = 0. An AdminDataDescriptor object may be supplied in order to add constraints and control the number of categories returned.

Parameters:
languageId -
dataDesc -
Returns:
Array of Category Objects
Throws:
java.lang.Exception

getChildren

int[] getChildren(int categoryId)
                  throws java.lang.Exception
Returns an array of categoryId describing the children of the given category. Returns null if there are no children.

Parameters:
categoryId -
Returns:
Return an array of categoryId
Throws:
java.lang.Exception

getCategory

AdminCategory getCategory(int categoryId,
                          boolean getChildren,
                          int languageId)
                          throws java.lang.Exception
Parameters:
categoryId -
getChildren - 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 children
Returns:
Return a fully populated single category object (no children)
Throws:
java.lang.Exception

getCategory

AdminCategory getCategory(int categoryId,
                          boolean getChildren,
                          int languageId,
                          java.lang.String storeId)
                          throws java.lang.Exception
Parameters:
categoryId -
getChildren - 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 children
storeId - The store id
Returns:
Return a fully populated single category object (no children)
Throws:
java.lang.Exception

doesCategoryExist

boolean doesCategoryExist(int categoryId)
                          throws org.apache.torque.TorqueException,
                                 KKAdminException
Return true if the category exists.

Parameters:
categoryId -
Returns:
True if the category exists
Throws:
org.apache.torque.TorqueException
KKAdminException

insertCategory

int insertCategory(AdminCategory cat)
                   throws java.lang.Exception
Insert a category as a child of the parent category. If parent category is 0, we make it a top level category.

Parameters:
cat -
Returns:
Returns the category Id
Throws:
java.lang.Exception

editCategory

void editCategory(AdminCategory cat)
                  throws java.lang.Exception
Edit the category.

Parameters:
cat -
Throws:
java.lang.Exception

deleteCategoryTree

void deleteCategoryTree(int categoryId,
                        int options)
                        throws java.lang.Exception
Delete the category referenced to by categoryId. The child categories and products will either be moved up a level or deleted. If the category is a top level category, then the products will be deleted.

Parameters:
categoryId -
options -
Throws:
java.lang.Exception

deleteSingleCategory

void deleteSingleCategory(int categoryId)
                          throws java.lang.Exception
Delete a single category.

Parameters:
categoryId -
Throws:
java.lang.Exception

moveCategory

void moveCategory(int categoryId,
                  int newParentId)
                  throws java.lang.Exception
Move this category to make it a child of the category identified by newParentId

Parameters:
categoryId -
newParentId -
Throws:
java.lang.Exception

getCategoriesPerPromotion

AdminCategory[] getCategoriesPerPromotion(int promotionId,
                                          int languageId)
                                          throws java.lang.Exception
Returns all of the categories for the promotion

Parameters:
promotionId -
languageId -
Returns:
Array of Category Objects
Throws:
java.lang.Exception

getCategoriesPerTagGroup

int[] getCategoriesPerTagGroup(int tagGroupId)
                               throws java.lang.Exception
Return an array of Category Ids linked to the specified tag group. An empty array is returned if no linked Category objects exist.

Parameters:
tagGroupId - The Id of the tag Group
Returns:
Returns an array of Category Ids
Throws:
java.lang.Exception

getCategoriesToTagGroups

AdminCategoryToTagGroup[] getCategoriesToTagGroups()
                                                   throws java.lang.Exception
Return an array of all of the AdminCategoryToTagGroup records. An empty array is returned if no such records exist.

Returns:
Returns an array of AdminCategoryToTagGroups
Throws:
java.lang.Exception

getCategoriesPerProduct

AdminCategory[] getCategoriesPerProduct(int productId,
                                        int languageId)
                                        throws java.lang.Exception
Returns all of the categories that the product belongs to.

Parameters:
productId -
languageId -
Returns:
Returns an array of categories
Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.