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 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: 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:
      ProductTravelRestrictionException - the product travel restriction exception
    • getTravelRestrictionFacade

      protected TravelRestrictionFacade getTravelRestrictionFacade()
      Gets travel restriction facade.
      Returns:
      the travelRestrictionFacade
    • setTravelRestrictionFacade

      public void setTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade)
      Sets travel restriction facade.
      Parameters:
      travelRestrictionFacade - the travelRestrictionFacade to set