Class NDCTravelRestrictionOrderValidationStrategy
java.lang.Object
de.hybris.platform.ndc182facades.facades.order.strategies.impl.NDCTravelRestrictionOrderValidationStrategy
- All Implemented Interfaces:
NDCChangeOrderValidationStrategy
public class NDCTravelRestrictionOrderValidationStrategy
extends Object
implements NDCChangeOrderValidationStrategy
The Ndc travel restriction order validation strategy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.product.ProductServiceGets product service.protected TravelRestrictionFacadeGets travel restriction facade.voidsetProductService(de.hybris.platform.product.ProductService productService) Sets product service.voidsetTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade) Sets travel restriction facade.booleanvalidateAmendOrder(OrderModel order, String productCode, Long qty, String travellerCode, List<String> transportOfferingCodes, String travelRouteCode) Method that validates if an ancillary can be added or removed to the specified order
-
Constructor Details
-
NDCTravelRestrictionOrderValidationStrategy
public NDCTravelRestrictionOrderValidationStrategy()
-
-
Method Details
-
validateAmendOrder
public boolean validateAmendOrder(OrderModel order, String productCode, Long qty, String travellerCode, List<String> transportOfferingCodes, String travelRouteCode) Description copied from interface:NDCChangeOrderValidationStrategyMethod that validates if an ancillary can be added or removed to the specified order- Specified by:
validateAmendOrderin interfaceNDCChangeOrderValidationStrategy- Parameters:
order- the order to which the ancillary needs to be addedproductCode- as the product to be added or removed from the orderqty- 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 from- Returns:
- valid add to order if true, false otherwise.
-
getTravelRestrictionFacade
Gets travel restriction facade.- Returns:
- the travel restriction facade
-
setTravelRestrictionFacade
Sets travel restriction facade.- Parameters:
travelRestrictionFacade- the travel restriction facade
-
getProductService
protected de.hybris.platform.product.ProductService getProductService()Gets product service.- Returns:
- the product service
-
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService) Sets product service.- Parameters:
productService- the product service
-