Class DefaultCartTravellersValidationStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.DefaultCartTravellersValidationStrategy
- All Implemented Interfaces:
AddTransportBundleToCartValidationStrategy
public class DefaultCartTravellersValidationStrategy
extends Object
implements AddTransportBundleToCartValidationStrategy
Strategy to validate if the cart already contains a list of travellers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.order.CartServiceGets cart service.voidsetCartService(de.hybris.platform.order.CartService cartService) Sets cart service.voidvalidate(AddBundleToCartData addBundleToCartData) Validates if 1) there is at least one travellers in the cart before adding the bundle to the cart.
-
Constructor Details
-
DefaultCartTravellersValidationStrategy
public DefaultCartTravellersValidationStrategy()
-
-
Method Details
-
validate
public void validate(AddBundleToCartData addBundleToCartData) throws AddTransportBundleToCartException, InvalidSessionCartException Validates if 1) there is at least one travellers in the cart before adding the bundle to the cart.- Specified by:
validatein interfaceAddTransportBundleToCartValidationStrategy- Parameters:
addBundleToCartData- the addBundleToCartData to be validated- Throws:
AddTransportBundleToCartExceptionInvalidSessionCartException
-
getCartService
protected de.hybris.platform.order.CartService getCartService()Gets cart service.- Returns:
- the cart service
-
setCartService
public void setCartService(de.hybris.platform.order.CartService cartService) Sets cart service.- Parameters:
cartService- the cart service
-