Interface BundleCartFacade
-
- All Known Implementing Classes:
DefaultBundleCommerceCartFacade
public interface BundleCartFacadeBundle Cart facade interface. Service is responsible for getting and updating all necessary information for a bundle cart.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CartModificationDataaddToCart(java.lang.String productCode, long quantity, int groupNumber)Add a product to an existing bundle.ProductSearchPageData<SearchStateData,ProductData>getAllowedProducts(java.lang.Integer groupNumber, java.lang.String searchQuery, PageableData pageableData)Constructs pageable list of products available for entry group of typeGroupType.CONFIGURABLEBUNDLECartModificationDatastartBundle(java.lang.String bundleTemplateId, java.lang.String productCode, long quantity)Start new bundle in cart based on the given bundle template and add the product to it.
-
-
-
Method Detail
-
startBundle
CartModificationData startBundle(@Nonnull java.lang.String bundleTemplateId, @Nonnull java.lang.String productCode, long quantity) throws CommerceCartModificationException
Start new bundle in cart based on the given bundle template and add the product to it.- Parameters:
bundleTemplateId- a component to add the product to. He whole bundle structure - starting from the root of the component - will be added to cart groupsproductCode- a product which will be added to the componentquantity- quantity for the product. Is limited by selection criteria of the component- Returns:
- information about the new cart entry
- Throws:
CommerceCartModificationException- if the operation is not possible- See Also:
EntryGroup,BundleSelectionCriteria
-
addToCart
CartModificationData addToCart(@Nonnull java.lang.String productCode, long quantity, int groupNumber) throws CommerceCartModificationException
Add a product to an existing bundle.- Parameters:
productCode- product to addquantity- quantity of the productgroupNumber- entry group number, that defines the bundle and the component within the bundle- Returns:
- information about the new cart entry
- Throws:
CommerceCartModificationException- if the operation is not possible- See Also:
EntryGroup
-
getAllowedProducts
@Nonnull ProductSearchPageData<SearchStateData,ProductData> getAllowedProducts(@Nonnull java.lang.Integer groupNumber, java.lang.String searchQuery, @Nonnull PageableData pageableData)
Constructs pageable list of products available for entry group of typeGroupType.CONFIGURABLEBUNDLE- Parameters:
groupNumber- entry group number related to the componentsearchQuery- the search querypageableData- the page to return- Returns:
- the search results
- Throws:
java.lang.IllegalArgumentException- if group is not found or group type is notGroupType.CONFIGURABLEBUNDLE
-
-