Class BundledProductValidationStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.AbstractAddToCartValidationStrategy
de.hybris.platform.travelfacades.strategies.impl.BundledProductValidationStrategy
- All Implemented Interfaces:
AddToCartValidationStrategy
Strategy that extends the
AbstractAddToCartValidationStrategy.
The strategy is used to validate the addToCart of a product. The addToCart is not valid if the product is included in
a bundle.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BookingServiceGets booking service.protected de.hybris.platform.order.CartServiceGets cart service.voidsetBookingService(BookingService bookingService) Sets booking service.voidsetCartService(de.hybris.platform.order.CartService cartService) Sets cart service.validateAddToCart(String productCode, long qty, String travellerCode, List<String> transportOfferingCodes, String travelRouteCode) Method to validate the add to cart of an ancillary productMethods inherited from class de.hybris.platform.travelfacades.strategies.AbstractAddToCartValidationStrategy
getAddToCartResponse, getAddToCartResponse
-
Constructor Details
-
BundledProductValidationStrategy
public BundledProductValidationStrategy()
-
-
Method Details
-
validateAddToCart
public AddToCartResponseData validateAddToCart(String productCode, long qty, String travellerCode, List<String> transportOfferingCodes, String travelRouteCode) Description copied from interface:AddToCartValidationStrategyMethod to validate the add to cart of an ancillary product- Parameters:
productCode- as the product to be added or removed from the cartqty- as the quantity to add/removetravellerCode- as the code of the traveller to whom the product is added or removedtransportOfferingCodes- as the codes of the transportOfferings the product is added to or removed fromtravelRouteCode- as the travelRouteCode the product is added to or removed from- Returns:
- the addToCartResponseData, where valid is true if the addToCart is valid, false otherwise.
-
getBookingService
Gets booking service.- Returns:
- the bookingService
-
setBookingService
Sets booking service.- Parameters:
bookingService- the bookingService to set
-
getCartService
protected de.hybris.platform.order.CartService getCartService()Gets cart service.- Returns:
- the cartService
-
setCartService
public void setCartService(de.hybris.platform.order.CartService cartService) Sets cart service.- Parameters:
cartService- the cartService to set
-