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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckTransportOfferings(AbstractOrderEntryModel orderEntry, List<String> transportOfferingCodes) Verifies if order entry has a matching list of transport offeringsprotected TravelCartServiceGets the travelCartServicevoidsetTravelCartService(TravelCartService travelCartService) Sets the travelCartServicevalidateAddToCart(String productCode, long qty, String travellerCode, List<String> transportOfferingCodes, String travelRouteCode, int originDestinationRefNumber) Method to validate the add to cart of an ancillary productMethods inherited from class de.hybris.platform.travelfacades.strategies.AbstractAddAncillaryToCartValidationStrategy
createAddToCartResponse
-
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:AddAncillaryToCartValidationStrategyMethod to validate the add to cart of an ancillary product- Parameters:
productCode- as the product to be added or removed from the cartqty- as the quantity to add/removetravellerCode- as the code of the traveller to whom the product is added or removedtransportOfferingCodes- as the codes of the transportOfferings the product is added to or removed fromtravelRouteCode- as the travelRouteCode the product is added to or removed fromoriginDestinationRefNumber- 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 entrytransportOfferingCodes- the transport offering codes- Returns:
- true if list of transport offering matches
-
getTravelCartService
Gets the travelCartService- Returns:
- the travelCartService
-
setTravelCartService
Sets the travelCartService- Parameters:
travelCartService- the travelCartService
-