Class TravelCartItineraryValidationStrategy

java.lang.Object
de.hybris.platform.travelfacades.order.strategies.impl.AbstractTravelCartValidationStrategy
de.hybris.platform.travelfacades.order.strategies.impl.TravelCartItineraryValidationStrategy
All Implemented Interfaces:
TravelCartValidationStrategy

public class TravelCartItineraryValidationStrategy extends AbstractTravelCartValidationStrategy
The implementation of TravelCartValidationStrategy Validates the transport offerings in the cart
  • Constructor Details

    • TravelCartItineraryValidationStrategy

      public TravelCartItineraryValidationStrategy()
  • Method Details

    • validateCart

      public void validateCart(CartModel cartModel) throws TravelCartValidationException
      Description copied from interface: TravelCartValidationStrategy
      Validate cart for all the necessary information to place the order
      Throws:
      TravelCartValidationException
    • validateDepartureArrivalLocation

      protected void validateDepartureArrivalLocation(List<TravelOrderEntryInfoModel> travelOrderEntryInfoModelList)
      Validate departure arrival location.
      Parameters:
      travelOrderEntryInfoModelList - the travel order entry info model list
    • validateTransportOfferingStatus

      protected void validateTransportOfferingStatus(List<TravelOrderEntryInfoModel> travelOrderEntryInfoList)
      Validate if the status of transport offering is in cancelled, boarded or departed
      Parameters:
      travelOrderEntryInfoList - the travel order entry info model list
    • validateDepartureArrivalTime

      protected void validateDepartureArrivalTime(List<TravelOrderEntryInfoModel> travelOrderEntryInfoModelList)
      Validate departure arrival time. valid if the departure time of the first transport offering is after the arrival time of the last transport offering of the previous leg of the journey.
      Parameters:
      travelOrderEntryInfoModelList - the travel order entry info model list
    • validateOriginDestinationRefNumbers

      protected void validateOriginDestinationRefNumbers(List<TravelOrderEntryInfoModel> travelOrderEntryInfoModelList)
      Validate origin destination ref numbers. Retrieves the final origin destination ref number and check if there is at least one order entry for all previous origin destination ref number
      Parameters:
      travelOrderEntryInfoModelList - the travel order entry info model list
    • validateTransportOfferingsNotInPast

      protected void validateTransportOfferingsNotInPast(List<TravelOrderEntryInfoModel> travelOrderEntryInfoList)
      Validates transport offerings are not in past.
      Parameters:
      travelOrderEntryInfoList - the travel order entry info model list
    • getBookingFacade

      protected BookingFacade getBookingFacade()
      Gets booking facade.
      Returns:
      the booking facade
    • setBookingFacade

      public void setBookingFacade(BookingFacade bookingFacade)
      Sets booking facade.
      Parameters:
      bookingFacade - the booking facade
    • getTransportOfferingService

      protected TransportOfferingService getTransportOfferingService()
      Gets transport offering service.
      Returns:
      the transport offering service
    • setTransportOfferingService

      public void setTransportOfferingService(TransportOfferingService transportOfferingService)
      Sets transport offering service.
      Parameters:
      transportOfferingService - the transport offering service
    • getNotAllowedStatuses

      protected List<TransportOfferingStatus> getNotAllowedStatuses()
      Gets not allowed statuses.
      Returns:
      the not allowed statuses
    • setNotAllowedStatuses

      public void setNotAllowedStatuses(List<TransportOfferingStatus> notAllowedStatuses)
      Sets not allowed statuses.
      Parameters:
      notAllowedStatuses - the not allowed statuses