Class TravelRestrictionValidationStrategy

java.lang.Object
de.hybris.platform.travelfacades.strategies.AbstractAddToCartValidationStrategy
de.hybris.platform.travelfacades.strategies.impl.TravelRestrictionValidationStrategy
All Implemented Interfaces:
AddToCartValidationStrategy

public class TravelRestrictionValidationStrategy extends AbstractAddToCartValidationStrategy
Strategy that extends the AbstractAddToCartValidationStrategy. The strategy is used to validate the addToCart of a product. The addToCart is not valid if the final quantity of the product doesn't fulfil the travel restriction for that product.
  • Constructor Details

    • TravelRestrictionValidationStrategy

      public TravelRestrictionValidationStrategy()
  • Method Details

    • validateAddToCart

      public AddToCartResponseData validateAddToCart(String productCode, long qty, String travellerCode, List<String> transportOfferingCodes, String travelRouteCode)
      Description copied from interface: AddToCartValidationStrategy
      Method to validate the add to cart of an ancillary product
      Parameters:
      productCode - as the product to be added or removed from the cart
      qty - as the quantity to add/remove
      travellerCode - as the code of 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
      Returns:
      the addToCartResponseData, where valid is true if the addToCart is valid, false otherwise.
    • 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