Class AncillaryCartProductAvailabilityValidationStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.AncillaryCartProductAvailabilityValidationStrategy
- All Implemented Interfaces:
AncillaryCartValidationStrategy
- Direct Known Subclasses:
DefaultCartProductEntryAvailabilityValidationStrategy
public class AncillaryCartProductAvailabilityValidationStrategy
extends Object
implements AncillaryCartValidationStrategy
The strategy is used to validate the add to cart of a ancillary product based on its availability.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TravelCartFacadeGets cart facade.voidsetTravelCartFacade(TravelCartFacade travelCartFacade) Sets cart facade.voidvalidateAddToCart(String productCode, long qty, TravellerModel travellerModel, List<String> transportOfferingCodes, String travelRouteCode) Method to validate the add to cart of an ancillary product
-
Constructor Details
-
AncillaryCartProductAvailabilityValidationStrategy
public AncillaryCartProductAvailabilityValidationStrategy()
-
-
Method Details
-
validateAddToCart
public void validateAddToCart(String productCode, long qty, TravellerModel travellerModel, List<String> transportOfferingCodes, String travelRouteCode) throws ProductStockNotAvailableException Description copied from interface:AncillaryCartValidationStrategyMethod to validate the add to cart of an ancillary product- Specified by:
validateAddToCartin interfaceAncillaryCartValidationStrategy- Parameters:
productCode- as the product to be added or removed from the cartqty- as the quantity to add/removetravellerModel- 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- Throws:
ProductStockNotAvailableException- the product stock not available exception
-
getTravelCartFacade
Gets cart facade.- Returns:
- the cartFacade
-
setTravelCartFacade
Sets cart facade.- Parameters:
travelCartFacade- the cartFacade to set
-