Interface TuaProductService
- All Known Implementing Classes:
DefaultTuaProductService
public interface TuaProductService
Service responsible for handling
TuaProductModel related operations.- Since:
- 2208
-
Method Summary
Modifier and TypeMethodDescriptioncreateProduct(Class productClass) Creates an instance ofTuaProductModelsubtype.getNumberOfProductsFor(SpiProductContext spiProductContext) Retrieves the total number of products found for a given productContext.getProduct(String id) Returns aTuaProductModelfor the given id.getProducts(SpiProductContext spiProductContext, Integer offset, Integer limit) Retrieves a list ofTuaProductModelfor a given product context.voidremoveProduct(TuaProductModel product) Removes the givenTuaProductModelvoidsaveProduct(TuaProductModel product) Saves the givenTuaProductModel.
-
Method Details
-
getProduct
Returns aTuaProductModelfor the given id.- Parameters:
id- identifier ofTuaProductModel- Returns:
- the
TuaProductModelfound. - Throws:
de.hybris.platform.servicelayer.exceptions.ModelNotFoundException- if no subscribed product is found.
-
getProducts
List<TuaProductModel> getProducts(SpiProductContext spiProductContext, Integer offset, Integer limit) Retrieves a list ofTuaProductModelfor a given product context.- Parameters:
spiProductContext- the product context.offset- the offset.limit- the maximum number of returned products.- Returns:
- the list of products found for the given context.
-
getNumberOfProductsFor
Retrieves the total number of products found for a given productContext.- Parameters:
spiProductContext- the product context.- Returns:
- the number of products found.
-
saveProduct
Saves the givenTuaProductModel.- Parameters:
product- the product.
-
createProduct
Creates an instance ofTuaProductModelsubtype.- Parameters:
productClass- the class of theTuaProductModelsubtype.- Returns:
- the newly created model.
-
removeProduct
Removes the givenTuaProductModel- Parameters:
product- the product.
-