Class AncillaryCartTravelRestrictionValidationStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.AncillaryCartTravelRestrictionValidationStrategy
- All Implemented Interfaces:
AncillaryCartValidationStrategy
- Direct Known Subclasses:
DefaultCartProductEntryTravelRestrictionValidationStrategy
public class AncillaryCartTravelRestrictionValidationStrategy
extends Object
implements AncillaryCartValidationStrategy
The strategy is used to validate the add to cart of a ancillary product. The add to cart is not valid if the final quantity
of the
product doesn't fulfil the travel restriction for that product.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TravelRestrictionFacadeGets travel restriction facade.voidsetTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade) Sets travel restriction 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
-
AncillaryCartTravelRestrictionValidationStrategy
public AncillaryCartTravelRestrictionValidationStrategy()
-
-
Method Details
-
validateAddToCart
public void validateAddToCart(String productCode, long qty, TravellerModel travellerModel, List<String> transportOfferingCodes, String travelRouteCode) throws ProductTravelRestrictionException 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:
ProductTravelRestrictionException- the product travel restriction exception
-
getTravelRestrictionFacade
Gets travel restriction facade.- Returns:
- the travelRestrictionFacade
-
setTravelRestrictionFacade
Sets travel restriction facade.- Parameters:
travelRestrictionFacade- the travelRestrictionFacade to set
-