Class DefaultTravellerCartQuantityValidationStrategy

java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.DefaultTravellerCartQuantityValidationStrategy
All Implemented Interfaces:
AddTravellerToCartValidationStrategy

public class DefaultTravellerCartQuantityValidationStrategy extends Object implements AddTravellerToCartValidationStrategy
Strategy to validate the cart and the quantity of the new travellers.
  • Constructor Details

    • DefaultTravellerCartQuantityValidationStrategy

      public DefaultTravellerCartQuantityValidationStrategy()
  • Method Details

    • validate

      public void validate(TravellerQuantityListData travellerQuantityListData) throws AddTravellerToCartException, InvalidSessionCartException
      Validates if 1) the cart is empty 2) the sum of the new quantity and the number of the travellers already present in the cart is equal or less than 20 (maximum number of passengers).
      Specified by:
      validate in interface AddTravellerToCartValidationStrategy
      Parameters:
      travellerQuantityListData - the travellerQuantityListData
      Throws:
      AddTravellerToCartException
      InvalidSessionCartException
    • 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
    • getConfigurationService

      protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()
      Gets configuration service.
      Returns:
      the configuration service
    • setConfigurationService

      public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      Sets configuration service.
      Parameters:
      configurationService - the configuration service