public interface ProductService
ProductModels.| Modifier and Type | Method and Description |
|---|---|
boolean |
containsProductsForCategory(CategoryModel category)
Checks whether or not the specific
CategoryModel or any of its sub-categories contains at least one
product. |
java.lang.Integer |
getAllProductsCountForCategory(CategoryModel category)
Counts all products of the specific
CategoryModel excluding double linked products. |
java.util.List<ProductModel> |
getAllProductsForCatalogVersion(CatalogVersionModel catalogVersion)
Returns all
ProductModel list belonging to the specified CatalogVersionModel |
java.util.List<ProductModel> |
getOfflineProductsForCategory(CategoryModel category)
Returns all offline products that belong to the specified category.
|
java.util.List<ProductModel> |
getOnlineProductsForCategory(CategoryModel category)
Returns all online products that belong to the specified category.
|
UnitModel |
getOrderableUnit(ProductModel product)
Returns for the given
product the first found UnitModel from the
PriceInformations of the product. |
ProductModel |
getProduct(CatalogVersionModel catalogVersion,
java.lang.String code)
Deprecated.
since ages - as of release 4.3, please use
getProductForCode(CatalogVersionModel, String),
however this method does not use any restrictions
Returns the Product with the specified code belonging to the specified CatalogVersion. If the
specified catalog version is not in the search restriction for the current user this method won't find
any product (but it still exists). The admin user searches without any restrictions. As default the
search uses the current session user, the current session language and the current active catalog
versions (which are stored at the session in the attribute
SESSION_CATALOG_VERSIONS). If there is no active catalog version specified CatalogVersion is set as
active catalog version. |
ProductModel |
getProduct(java.lang.String code)
Deprecated.
since ages - as of release 4.3, please use
getProductForCode(String)
Returns the Product with the specified code. As default the search uses the current session user, the
current session language and the current active catalog versions (which are stored at the session in
the attribute SESSION_CATALOG_VERSIONS). For modifying the search session context see
FlexibleSearchQuery. |
ProductModel |
getProductForCode(CatalogVersionModel catalogVersion,
java.lang.String code)
Returns the Product with the specified code belonging to the specified CatalogVersion.
|
ProductModel |
getProductForCode(java.lang.String code)
Returns the Product with the specified code.
|
java.util.List<ProductModel> |
getProducts(CategoryModel category)
Deprecated.
since ages - as of release 4.3, please use
getProductsForCategory(CategoryModel) Returns all
Products belonging to the specified Category as a List. For the search the current session active
catalog versions of the current user are used. |
SearchResult<ProductModel> |
getProducts(CategoryModel category,
int start,
int count)
Deprecated.
since ages - as of release 4.3, please use
getProductsForCategory(CategoryModel, int, int)
Returns the specified range of Products belonging to the specified Category as a List. For the search
the current session active catalog versions of the current user are used. |
java.lang.Integer |
getProductsCountForCategory(CategoryModel category)
Counts all products of the specific
CategoryModel. |
java.util.List<ProductModel> |
getProductsForCategory(CategoryModel category)
Returns all Products belonging to the specified Category as a List.
|
java.util.List<ProductModel> |
getProductsForCategory(CategoryModel category,
int start,
int count)
Returns the specified range of Products belonging to the specified Category as a List.
|
UnitModel |
getUnit(java.lang.String code)
Deprecated.
since ages - as of release 4.3, please use
UnitService.getUnitForCode(String)
Returns the Unit with the specified code. |
@Deprecated ProductModel getProduct(java.lang.String code)
getProductForCode(String)
Returns the Product with the specified code. As default the search uses the current session user, the
current session language and the current active catalog versions (which are stored at the session in
the attribute SESSION_CATALOG_VERSIONS). For modifying the search session context see
FlexibleSearchQuery.code - the code of the ProductUnknownIdentifierException - if no Product with the specified code is foundAmbiguousIdentifierException - if more than one Product with the specified code is foundjava.lang.IllegalArgumentException - if parameter code is nullProductModel getProductForCode(java.lang.String code)
SESSION_CATALOG_VERSIONS).
For modifying the search session context see FlexibleSearchQuery.code - the code of the ProductUnknownIdentifierException - if no Product with the specified code is foundAmbiguousIdentifierException - if more than one Product with the specified code is foundjava.lang.IllegalArgumentException - if parameter code is null@Deprecated ProductModel getProduct(CatalogVersionModel catalogVersion, java.lang.String code)
getProductForCode(CatalogVersionModel, String),
however this method does not use any restrictions
Returns the Product with the specified code belonging to the specified CatalogVersion. If the
specified catalog version is not in the search restriction for the current user this method won't find
any product (but it still exists). The admin user searches without any restrictions. As default the
search uses the current session user, the current session language and the current active catalog
versions (which are stored at the session in the attribute
SESSION_CATALOG_VERSIONS). If there is no active catalog version specified CatalogVersion is set as
active catalog version.catalogVersion - the CatalogVersion of the Productcode - the code of the ProductUnknownIdentifierException - if no Product with the specified code and Catalog is found.AmbiguousIdentifierException - if more than one Product with the specified code and Catalog is foundUnitModel getOrderableUnit(ProductModel product)
product the first found UnitModel from the
PriceInformations of the product.product - the ProductModelProductModel.UNIT if no PriceInformations is available at the ProductModeljava.lang.IllegalArgumentException - if product is null.ModelNotFoundException - if no UnitModel was found for the given product@Deprecated UnitModel getUnit(java.lang.String code)
UnitService.getUnitForCode(String)
Returns the Unit with the specified code.code - the code of the UnitUnknownIdentifierException - if no Product with the specified code and Catalog is found.AmbiguousIdentifierException - if more than one Product with the specified code and Catalog is found@Deprecated java.util.List<ProductModel> getProducts(CategoryModel category)
getProductsForCategory(CategoryModel) Returns all
Products belonging to the specified Category as a List. For the search the current session active
catalog versions of the current user are used.category - the category the returned Products belong tojava.lang.IllegalArgumentException - if parameter category is nulljava.util.List<ProductModel> getProductsForCategory(CategoryModel category)
category - the category the returned Products belong tojava.lang.IllegalArgumentException - if parameter category is nulljava.util.List<ProductModel> getOnlineProductsForCategory(CategoryModel category)
category - the category the returned products belong tojava.lang.IllegalArgumentException - if parameter category is nulljava.util.List<ProductModel> getOfflineProductsForCategory(CategoryModel category)
category - the category the returned products belong tojava.lang.IllegalArgumentException - if parameter category is null@Deprecated SearchResult<ProductModel> getProducts(CategoryModel category, int start, int count)
getProductsForCategory(CategoryModel, int, int)
Returns the specified range of Products belonging to the specified Category as a List. For the search
the current session active catalog versions of the current user are used.category - the category the returned Products belong tostart - index position of the first Product, which will be included in the returned Listcount - number of Products which will be returned in the Listjava.lang.IllegalArgumentException - if parameter category is nulljava.util.List<ProductModel> getProductsForCategory(CategoryModel category, int start, int count)
category - the category the returned Products belong tostart - index position of the first Product, which will be included in the returned Listcount - number of Products which will be returned in the Listjava.lang.IllegalArgumentException - if parameter category is nulljava.lang.Integer getProductsCountForCategory(CategoryModel category)
CategoryModel.category - the CategoryModeljava.lang.IllegalArgumentException - if parameter category is null.java.lang.Integer getAllProductsCountForCategory(CategoryModel category)
CategoryModel excluding double linked products. This includes all its
own products and products belonging to any sub category.category - the CategoryModeljava.lang.IllegalArgumentException - if parameter category is null.boolean containsProductsForCategory(CategoryModel category)
CategoryModel or any of its sub-categories contains at least one
product.category - the CategoryModelCategoryModel or any of its sub-categories, false
otherwise.java.lang.IllegalArgumentException - if parameter category is null.ProductModel getProductForCode(CatalogVersionModel catalogVersion, java.lang.String code)
catalogVersion - the CatalogVersion of the Productcode - the code of the ProductUnknownIdentifierException - if no Product with the specified code and Catalog is found.AmbiguousIdentifierException - if more than one Product with the specified code and Catalog is foundjava.util.List<ProductModel> getAllProductsForCatalogVersion(CatalogVersionModel catalogVersion)
ProductModel list belonging to the specified CatalogVersionModelcatalogVersion - the CatalogVersion of the ProductsCopyright © 2018 SAP SE. All Rights Reserved.