Class DefaultNDCAlaCarteOfferDataValidationStrategy
java.lang.Object
de.hybris.platform.ndc182shoppingfacades.facades.order.strategies.impl.DefaultNDCAlaCarteOfferDataValidationStrategy
- All Implemented Interfaces:
OrderCreateRequestValidationStrategy<NDCAlaCarteOfferData>
public class DefaultNDCAlaCarteOfferDataValidationStrategy
extends Object
implements OrderCreateRequestValidationStrategy<NDCAlaCarteOfferData>
The ndc 18.2 implementation of
OrderCreateRequestValidationStrategy interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NDCAlaCarteValidatorGets ndc ala carte validator.voidsetNdcAlaCarteValidator(NDCAlaCarteValidator ndcAlaCarteValidator) Sets ndc ala carte validator.voidvalidate(List<NDCAlaCarteOfferData> ndcOfferDataList, IATAOrderCreateRQ orderCreateRQ) This method validates an AlaCarteOfferData.protected voidvalidateAlaCarteOfferItems(List<NDCAlaCarteOfferItemData> offerItems, SelectedOfferType selectedOffer, String offerID, DataListsType dataLists) Validates all the alaCarteOfferItems.protected voidvalidatePaxList(List<NDCPassengerData> passengers, List<String> paxRefID) Validates the ndc offer item data by pax list.
-
Constructor Details
-
DefaultNDCAlaCarteOfferDataValidationStrategy
public DefaultNDCAlaCarteOfferDataValidationStrategy()
-
-
Method Details
-
validate
public void validate(List<NDCAlaCarteOfferData> ndcOfferDataList, IATAOrderCreateRQ orderCreateRQ) throws NDCException This method validates an AlaCarteOfferData. For each offerItem checks if 1) exists the same offerItem in the cached offer, 2) the passengers are the same, 3) the paxJourney linked to the ancillary is equal to the cached one (same transport offerings).- Specified by:
validatein interfaceOrderCreateRequestValidationStrategy<NDCAlaCarteOfferData>- Parameters:
ndcOfferDataList- the ndcOfferDataListorderCreateRQ- the orderCreateRQ- Throws:
NDCException
-
validateAlaCarteOfferItems
protected void validateAlaCarteOfferItems(List<NDCAlaCarteOfferItemData> offerItems, SelectedOfferType selectedOffer, String offerID, DataListsType dataLists) throws NDCException Validates all the alaCarteOfferItems. Checks if the offerItems are the same.- Parameters:
offerItems- the offer item idsselectedOffer- the selectedOfferofferID- the offer iddataLists- the data lists- Throws:
NDCException- the ndc exception
-
validatePaxList
protected void validatePaxList(List<NDCPassengerData> passengers, List<String> paxRefID) throws NDCException Validates the ndc offer item data by pax list. For each offerItem checks if the list of the passengers is the same.- Parameters:
passengers- the passengerspaxRefID- the pax ref id- Throws:
NDCException- the ndc exception
-
getNdcAlaCarteValidator
Gets ndc ala carte validator.- Returns:
- the ndc ala carte validator
-
setNdcAlaCarteValidator
Sets ndc ala carte validator.- Parameters:
ndcAlaCarteValidator- the ndc ala carte validator
-