public interface CatalogService
| Modifier and Type | Method and Description |
|---|---|
void |
addToCategories(TypedObject categorizableItem,
List<TypedObject> categories)
Adds given categorizable item to given categories.
|
boolean |
assignProduct(TypedObject product,
CatalogVersionModel catalogVersionModel,
CategoryModel removeFromCategory) |
boolean |
assignProduct(TypedObject product,
CategoryModel newSuperCategory,
CategoryModel removeFromCategory) |
boolean |
assignProducts(Collection<TypedObject> products,
CategoryModel newSuperCategory,
CategoryModel removeFromCategory) |
List<CatalogVersionModel> |
getAllCatalogVersions(UserModel user)
Get all available catalog versions for an user
|
List<CatalogModel> |
getAvailableCatalogs(UserModel user)
Get the available catalogs for an user
|
List<CatalogVersionModel> |
getAvailableCatalogVersions()
Get the available catalog versions for the current user
|
CatalogModel |
getCatalog(CatalogVersionModel version)
Get the catalog for the given catalog version
|
CatalogVersionModel |
getCatalogVersion(CategoryModel category)
Get the catalog versions containing the given category
|
CatalogVersionModel |
getCatalogVersion(PK pk)
Get the CatalogVersion for a Catalog item, specified by PK
|
List<CatalogVersionModel> |
getCatalogVersions(CatalogModel catalog,
UserModel user)
Get the catalog versions for a catalog
|
TypedObject |
getCatalogVersionTypedObject(CatalogVersionModel catVer) |
List<CategoryModel> |
getCategories(CatalogVersionModel version)
Get all root categories under a catalog version
|
List<CategoryModel> |
getCategories(CategoryModel category)
Get all direct sub-categories for a category
|
long |
getCategoryCount(CatalogVersionModel version)
get the number of root categories under a catalog version
|
long |
getCategoryCount(CategoryModel category)
Get the number of sub-categories for a category
|
List<CategoryModel> |
getCategoryPath(CategoryModel category)
Get a list of categories representing the path from the given category through all supercategories to the root
category
|
int |
getItemCount(MacFinderTreeNode wrappedCategory,
CatalogVersionModel version,
boolean includeSubCategory,
MacFinderTreeNode connectedItem) |
List<MacFinderTreeNode> |
getItems(MacFinderTreeNode wrappedCategory,
CatalogVersionModel version,
boolean includeSubCategory,
MacFinderTreeNode connectedItem)
Get the products for a given category.
|
List<CatalogVersionModel> |
getSortedCatalogVersions(UserModel user)
Get the available catalog versions for an user in an alternative order
|
Collection<String> |
getSubcategoriesHavingSubcategories(ItemModel item)
Get a collection of all non-empty sub-categories for a given category or catalog version
|
List<TypedObject> |
getSupercategories(TypedObject categorizableItem,
boolean fromSameCatalogVersionOnly)
Returns list of supercategories of the given categorizable item.
|
boolean |
isAssignProductPermitted(TypedObject product,
CategoryModel newSuperCategory,
CategoryModel removeFromCategory) |
boolean |
isMoveCategoriesPermitted(Collection<TypedObject> categories,
CategoryModel newSuperCategory,
CategoryModel removeCategory) |
boolean |
isMoveCategoryPermitted(CategoryModel category,
CategoryModel newSuperCategory,
CategoryModel removeCategory) |
boolean |
moveCategories(Collection<TypedObject> categores,
CategoryModel newSuperCategory,
CategoryModel removeCategory) |
boolean |
moveCategory(CategoryModel category,
CategoryModel newSuperCategory,
CategoryModel removeCategory) |
void |
removeFromCategories(TypedObject categorizableItem,
List<TypedObject> categories)
Removes given categorizable item from given categories.
|
boolean |
setAsRootCategory(CategoryModel category) |
CatalogVersionModel |
wrapCatalogVersion(TypedObject typedObject) |
CategoryModel |
wrapCategory(TypedObject typedObject) |
List<CatalogModel> getAvailableCatalogs(UserModel user)
user - the userList<CatalogVersionModel> getCatalogVersions(CatalogModel catalog, UserModel user)
catalog - the catalog containing the versionsuser - the userList<CatalogVersionModel> getAllCatalogVersions(UserModel user)
user - the userList<CatalogVersionModel> getAvailableCatalogVersions()
List<CatalogVersionModel> getSortedCatalogVersions(UserModel user)
user - the userList<CategoryModel> getCategories(CatalogVersionModel version)
version - the catalog versionlong getCategoryCount(CatalogVersionModel version)
version - the catalog versionList<CategoryModel> getCategories(CategoryModel category)
category - the super-categorylong getCategoryCount(CategoryModel category)
category - the categoryCatalogModel getCatalog(CatalogVersionModel version)
version - the catalog versionCatalogVersionModel getCatalogVersion(CategoryModel category)
category - the categoryList<CategoryModel> getCategoryPath(CategoryModel category)
category - the categoryCollection<String> getSubcategoriesHavingSubcategories(ItemModel item)
item - the catalog or catalog versionCatalogVersionModel getCatalogVersion(PK pk)
pk - the pk of the itemList<MacFinderTreeNode> getItems(MacFinderTreeNode wrappedCategory, CatalogVersionModel version, boolean includeSubCategory, MacFinderTreeNode connectedItem)
wrappedCategory - the categoryincludeSubCategory - if true, also include products from sub-categoriesint getItemCount(MacFinderTreeNode wrappedCategory, CatalogVersionModel version, boolean includeSubCategory, MacFinderTreeNode connectedItem)
boolean isMoveCategoriesPermitted(Collection<TypedObject> categories, CategoryModel newSuperCategory, CategoryModel removeCategory)
boolean isMoveCategoryPermitted(CategoryModel category, CategoryModel newSuperCategory, CategoryModel removeCategory)
boolean isAssignProductPermitted(TypedObject product, CategoryModel newSuperCategory, CategoryModel removeFromCategory)
boolean moveCategory(CategoryModel category, CategoryModel newSuperCategory, CategoryModel removeCategory)
boolean moveCategories(Collection<TypedObject> categores, CategoryModel newSuperCategory, CategoryModel removeCategory)
boolean setAsRootCategory(CategoryModel category)
boolean assignProduct(TypedObject product, CategoryModel newSuperCategory, CategoryModel removeFromCategory)
boolean assignProducts(Collection<TypedObject> products, CategoryModel newSuperCategory, CategoryModel removeFromCategory)
boolean assignProduct(TypedObject product, CatalogVersionModel catalogVersionModel, CategoryModel removeFromCategory)
CategoryModel wrapCategory(TypedObject typedObject)
CatalogVersionModel wrapCatalogVersion(TypedObject typedObject)
TypedObject getCatalogVersionTypedObject(CatalogVersionModel catVer)
List<TypedObject> getSupercategories(TypedObject categorizableItem, boolean fromSameCatalogVersionOnly)
categorizableItem - a categorizable item (product, category..)fromSameCatalogVersionOnly - if true, only supercategories belonging to the same catalog version as given categorizable item are
returnedvoid addToCategories(TypedObject categorizableItem, List<TypedObject> categories)
categorizableItem - the categorizable item to be addedcategories - the categories to add tovoid removeFromCategories(TypedObject categorizableItem, List<TypedObject> categories)
categorizableItem - the categorizable item to be removedcategories - the categories to remove fromCopyright © 2017 SAP SE. All Rights Reserved.