Class DefaultOriginDestinationRefNumberCartValidationStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.DefaultOriginDestinationRefNumberCartValidationStrategy
- All Implemented Interfaces:
AddTransportBundleToCartValidationStrategy
public class DefaultOriginDestinationRefNumberCartValidationStrategy
extends Object
implements AddTransportBundleToCartValidationStrategy
Strategy to validate the originDestinationRefNumber against the ones already present in the cart.
-
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 the origin destination reference number.
-
Constructor Details
-
DefaultOriginDestinationRefNumberCartValidationStrategy
public DefaultOriginDestinationRefNumberCartValidationStrategy()
-
-
Method Details
-
validate
public void validate(AddBundleToCartData addBundleToCartData) throws AddTransportBundleToCartException, InvalidSessionCartException Validates the origin destination reference number. Checks if the cart already contains the number.- Specified by:
validatein interfaceAddTransportBundleToCartValidationStrategy- Parameters:
addBundleToCartData- the addBundleToCartData- 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
-