Class TravelRouteOriginDestinationRefNumberValidationStrategy

java.lang.Object
de.hybris.platform.travelfacades.strategies.AbstractAddAncillaryToCartValidationStrategy
de.hybris.platform.travelfacades.strategies.impl.TravelRouteOriginDestinationRefNumberValidationStrategy
All Implemented Interfaces:
AddAncillaryToCartValidationStrategy

public class TravelRouteOriginDestinationRefNumberValidationStrategy extends AbstractAddAncillaryToCartValidationStrategy
Strategy to validate the travel route of the ancillary product to add to the cart.
  • Constructor Details

    • TravelRouteOriginDestinationRefNumberValidationStrategy

      public TravelRouteOriginDestinationRefNumberValidationStrategy()
  • Method Details

    • validateAddToCart

      public AddToCartResponseData validateAddToCart(String productCode, long qty, String travellerCode, List<String> transportOfferingCodes, String travelRouteCode, int originDestinationRefNumber)
      Description copied from interface: AddAncillaryToCartValidationStrategy
      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
      originDestinationRefNumber - as the origin destination reference number
      Returns:
      the add to cart response data
    • checkTransportOfferings

      protected boolean checkTransportOfferings(AbstractOrderEntryModel orderEntry, List<String> transportOfferingCodes)
      Verifies if order entry has a matching list of transport offerings
      Parameters:
      orderEntry - the order entry
      transportOfferingCodes - the transport offering codes
      Returns:
      true if list of transport offering matches
    • getTravelCartService

      protected TravelCartService getTravelCartService()
      Gets the travelCartService
      Returns:
      the travelCartService
    • setTravelCartService

      public void setTravelCartService(TravelCartService travelCartService)
      Sets the travelCartService
      Parameters:
      travelCartService - the travelCartService