Interface AsCategoryService
-
- All Known Implementing Classes:
DefaultAsCategoryService
public interface AsCategoryServiceService that provides category related functionality that is required by adaptive search.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<CategoryModel>buildCategoryPath(java.util.List<java.lang.String> categoryCodes, java.util.List<CatalogVersionModel> catalogVersions, boolean recursive)Builds the category path.voidclearCurrentCategoryPath()Clears the current category path in the session.java.util.List<CategoryModel>getAllCategoriesForCatalogVersion(CatalogVersionModel catalogVersion)Returns all categories belonging to the specified catalog version.java.util.List<java.util.List<PK>>getAllCategoryRelationsForCatalogVersion(CatalogVersionModel catalogVersion)Returns all category relations belonging to the specified catalog version.java.util.Optional<java.util.List<CategoryModel>>getCurrentCategoryPath()Returns the current category path in the session.voidsetCurrentCategoryPath(java.util.List<CategoryModel> categoryPath)Sets the current category path in the session.
-
-
-
Method Detail
-
setCurrentCategoryPath
void setCurrentCategoryPath(java.util.List<CategoryModel> categoryPath)
Sets the current category path in the session.- Parameters:
categoryPath- - the category path
-
getCurrentCategoryPath
java.util.Optional<java.util.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
java.util.List<CategoryModel> buildCategoryPath(java.util.List<java.lang.String> categoryCodes, java.util.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
java.util.List<CategoryModel> getAllCategoriesForCatalogVersion(CatalogVersionModel catalogVersion)
Returns all categories belonging to the specified catalog version.- Parameters:
catalogVersion- the catalog version- Returns:
- all categories belonging to the specified catalog version
-
getAllCategoryRelationsForCatalogVersion
java.util.List<java.util.List<PK>> getAllCategoryRelationsForCatalogVersion(CatalogVersionModel catalogVersion)
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
-
-