Class OriginDestinationValidationStrategy

java.lang.Object
de.hybris.platform.travelfacades.strategies.AbstractAddBundleToCartValidationStrategy
de.hybris.platform.travelfacades.strategies.impl.OriginDestinationValidationStrategy
All Implemented Interfaces:
AddBundleToCartValidationStrategy
Direct Known Subclasses:
DefaultShoppingOriginDestinationValidationStrategy

public class OriginDestinationValidationStrategy extends AbstractAddBundleToCartValidationStrategy
Strategy that extends the AbstractAddBundleToCartValidationStrategy. The strategy is used to validate the addBundleToCart, that will be valid only if the origin location corresponding to the TravelRouteModel specified in the AddBundleToCartRequestData is equals to the destination location of the entry with the previous originDestinationRefNumber.
  • Field Details

    • ADD_BUNDLE_TO_CART_VALIDATION_ERROR_ORIGIN_DESTINATION

      public static final String ADD_BUNDLE_TO_CART_VALIDATION_ERROR_ORIGIN_DESTINATION
      See Also:
  • Constructor Details

    • OriginDestinationValidationStrategy

      public OriginDestinationValidationStrategy()
  • Method Details

    • validate

      public AddToCartResponseData validate(AddBundleToCartRequestData addBundleToCartRequestData)
      Description copied from interface: AddBundleToCartValidationStrategy
      Validates the add bundle to cart
      Parameters:
      addBundleToCartRequestData - as the add bundle to cart request data
      Returns:
      the add to cart response data
    • getCartService

      protected de.hybris.platform.order.CartService getCartService()
      Returns:
      the cartService
    • setCartService

      public void setCartService(de.hybris.platform.order.CartService cartService)
      Parameters:
      cartService - the cartService to set
    • getTravelRouteService

      protected TravelRouteService getTravelRouteService()
      Returns:
      the travelRouteService
    • setTravelRouteService

      public void setTravelRouteService(TravelRouteService travelRouteService)
      Parameters:
      travelRouteService - the travelRouteService to set