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
The implementation of
TravelCartValidationStrategy
Validates the transport offerings in the cart-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BookingFacadeGets booking facade.protected List<TransportOfferingStatus>Gets not allowed statuses.protected TransportOfferingServiceGets transport offering service.voidsetBookingFacade(BookingFacade bookingFacade) Sets booking facade.voidsetNotAllowedStatuses(List<TransportOfferingStatus> notAllowedStatuses) Sets not allowed statuses.voidsetTransportOfferingService(TransportOfferingService transportOfferingService) Sets transport offering service.voidvalidateCart(CartModel cartModel) Validate cart for all the necessary information to place the orderprotected voidvalidateDepartureArrivalLocation(List<TravelOrderEntryInfoModel> travelOrderEntryInfoModelList) Validate departure arrival location.protected voidvalidateDepartureArrivalTime(List<TravelOrderEntryInfoModel> travelOrderEntryInfoModelList) Validate departure arrival time.protected voidvalidateOriginDestinationRefNumbers(List<TravelOrderEntryInfoModel> travelOrderEntryInfoModelList) Validate origin destination ref numbers.protected voidvalidateTransportOfferingsNotInPast(List<TravelOrderEntryInfoModel> travelOrderEntryInfoList) Validates transport offerings are not in past.protected voidvalidateTransportOfferingStatus(List<TravelOrderEntryInfoModel> travelOrderEntryInfoList) Validate if the status of transport offering is in cancelled, boarded or departedMethods inherited from class de.hybris.platform.travelfacades.order.strategies.impl.AbstractTravelCartValidationStrategy
getTransportFareProductEntries, getTravelOrderEntryInfoListForFareProducts, getUTCDepartureTime, isReturnJourney
-
Constructor Details
-
TravelCartItineraryValidationStrategy
public TravelCartItineraryValidationStrategy()
-
-
Method Details
-
validateCart
Description copied from interface:TravelCartValidationStrategyValidate 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
Gets booking facade.- Returns:
- the booking facade
-
setBookingFacade
Sets booking facade.- Parameters:
bookingFacade- the booking facade
-
getTransportOfferingService
Gets transport offering service.- Returns:
- the transport offering service
-
setTransportOfferingService
Sets transport offering service.- Parameters:
transportOfferingService- the transport offering service
-
getNotAllowedStatuses
Gets not allowed statuses.- Returns:
- the not allowed statuses
-
setNotAllowedStatuses
Sets not allowed statuses.- Parameters:
notAllowedStatuses- the not allowed statuses
-