Class TransportOfferingsTimesValidationStrategy

java.lang.Object
de.hybris.platform.travelfacades.strategies.AbstractAddBundleToCartValidationStrategy
de.hybris.platform.travelfacades.strategies.impl.TransportOfferingsTimesValidationStrategy
All Implemented Interfaces:
AddBundleToCartValidationStrategy

public class TransportOfferingsTimesValidationStrategy extends AbstractAddBundleToCartValidationStrategy
Strategy that extends the AbstractAddBundleToCartValidationStrategy. The strategy is used to validate the addBundleToCart, that will be valid only if the departure time of the first transport offerings specified in the AddBundleToCartRequestData is after the arrival time of the last transport offering of the previous leg of the journey and its arrival time is after the departure time of the first transport offering of the next leg of the journey.
  • Field Details

    • ADD_BUNDLE_TO_CART_VALIDATION_ERROR_DEPARTURE_ARRIVAL

      public static final String ADD_BUNDLE_TO_CART_VALIDATION_ERROR_DEPARTURE_ARRIVAL
      See Also:
    • ADD_BUNDLE_TO_CART_VALIDATION_ERROR_NO_ODREFNUMBER

      public static final String ADD_BUNDLE_TO_CART_VALIDATION_ERROR_NO_ODREFNUMBER
      See Also:
  • Constructor Details

    • TransportOfferingsTimesValidationStrategy

      public TransportOfferingsTimesValidationStrategy()
  • Method Details

    • validate

      public AddToCartResponseData validate(AddBundleToCartRequestData addBundleToCartRequestData)
      Description copied from interface: AddBundleToCartValidationStrategy
      Validates the add bundle to cart
      Parameters:
      addBundleToCartRequestData - as the add bundle to cart request data
      Returns:
      the add to cart response data
    • getUTCDepartureTime

      protected ZonedDateTime getUTCDepartureTime(TransportOfferingModel transportOfferingModel)
      Return the UTC departure time for the given transportOffering
      Parameters:
      transportOfferingModel - as the tranportOffering
      Returns:
      the zoned date time
    • getCartService

      protected de.hybris.platform.order.CartService getCartService()
      Returns:
      the cartService
    • setCartService

      public void setCartService(de.hybris.platform.order.CartService cartService)
      Parameters:
      cartService - the cartService to set
    • getTransportOfferingService

      protected TransportOfferingService getTransportOfferingService()
      Returns:
      the transportOfferingService
    • setTransportOfferingService

      public void setTransportOfferingService(TransportOfferingService transportOfferingService)
      Parameters:
      transportOfferingService - the transportOfferingService to set