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 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: AncillaryCartValidationStrategy
      Method to validate the add to cart of an ancillary product
      Specified by:
      validateAddToCart in interface AncillaryCartValidationStrategy
      Parameters:
      productCode - as the product to be added or removed from the cart
      qty - as the quantity to add/remove
      travellerModel - the traveller to whom the product is added or removed
      transportOfferingCodes - as the codes of the transportOfferings the product is added to or removed from
      travelRouteCode - as the travelRouteCode the product is added to or removed from
      Throws:
      ProductStockNotAvailableException - the product stock not available exception
    • getTravelCartFacade

      protected TravelCartFacade getTravelCartFacade()
      Gets cart facade.
      Returns:
      the cartFacade
    • setTravelCartFacade

      public void setTravelCartFacade(TravelCartFacade travelCartFacade)
      Sets cart facade.
      Parameters:
      travelCartFacade - the cartFacade to set