Interface CommerceCategoryService
- All Known Implementing Classes:
DefaultCommerceCategoryService
public interface CommerceCategoryService
The CommerceCategoryService supports looking up categories within the current session product catalog. Other
types of session catalog, i.e. content catalogs and classification catalogs are excluded.
-
Method Summary
Modifier and TypeMethodDescriptiongetCategoryForCode(String code) Retrieves theCategoryModelwith the specificcode.getPathsForCategory(CategoryModel category) Returns all paths for thisCategoryModel.
-
Method Details
-
getCategoryForCode
Retrieves theCategoryModelwith the specificcode.- Parameters:
code- the code of the to be foundCategoryModel- Returns:
- found
CategoryModel - Throws:
UnknownIdentifierException- if no category with the specified code can be found.AmbiguousIdentifierException- if more than one category with the specifiedcodeandcatalogVersionwas found.IllegalArgumentException- if parametercodeisnull.
-
getPathsForCategory
Returns all paths for thisCategoryModel. Each path is a list of all categories in the path from root to this category.- Parameters:
category- the (sub)CategoryModel- Returns:
- all paths for this
CategoryModel, or empty collection if this category has no super-categories. - Throws:
IllegalArgumentException- if parametercategoryisnull.
-