Interface AsCategoryService
- All Known Implementing Classes:
DefaultAsCategoryService
public interface AsCategoryService
Service that provides category related functionality that is required by adaptive search.
-
Method Summary
Modifier and TypeMethodDescriptionbuildCategoryPath(List<String> categoryCodes, List<CatalogVersionModel> catalogVersions, boolean recursive) Builds the category path.voidClears the current category path in the session.getAllCategoriesForCatalogVersion(CatalogVersionModel catalogVersion) Returns all categories belonging to the specified catalog version.getAllCategoryRelationsForCatalogVersion(CatalogVersionModel catalogVersion) Returns all category relations belonging to the specified catalog version.Returns the current category path in the session.voidsetCurrentCategoryPath(List<CategoryModel> categoryPath) Sets the current category path in the session.
-
Method Details
-
setCurrentCategoryPath
Sets the current category path in the session.- Parameters:
categoryPath- - the category path
-
getCurrentCategoryPath
Optional<List<CategoryModel>> getCurrentCategoryPath()Returns the current category path in the session. If there are no current category path, an emptyOptionalis returned.- Returns:
- the current category path
-
clearCurrentCategoryPath
void clearCurrentCategoryPath()Clears the current category path in the session. -
buildCategoryPath
List<CategoryModel> buildCategoryPath(List<String> categoryCodes, List<CatalogVersionModel> catalogVersions, boolean recursive) Builds the category path.- Parameters:
categoryCodes- - the category codescatalogVersions- - the catalog versionsrecursive- -trueif the supercategories should be considered,falseotherwise- Returns:
- the category path
-
getAllCategoriesForCatalogVersion
Returns all categories belonging to the specified catalog version.- Parameters:
catalogVersion- the catalog version- Returns:
- all categories belonging to the specified catalog version
-
getAllCategoryRelationsForCatalogVersion
Returns all category relations belonging to the specified catalog version.- Parameters:
catalogVersion- the catalog version- Returns:
- all category relations belonging to the specified catalog version
-