Class DefaultShoppingTravelCommerceCartService

java.lang.Object
de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartService
de.hybris.platform.subscriptionservices.subscription.impl.DefaultSubscriptionCommerceCartService
de.hybris.platform.travelservices.order.impl.DefaultTravelCommerceCartService
de.hybris.platform.shoppingservices.order.impl.DefaultShoppingTravelCommerceCartService
All Implemented Interfaces:
de.hybris.platform.commerceservices.order.CommerceCartService, ShoppingTravelCommerceCartService, de.hybris.platform.subscriptionservices.subscription.SubscriptionCommerceCartService, TravelCommerceCartService

public class DefaultShoppingTravelCommerceCartService extends DefaultTravelCommerceCartService implements ShoppingTravelCommerceCartService
The type Default shopping travel commerce cart service.
  • Constructor Details

    • DefaultShoppingTravelCommerceCartService

      public DefaultShoppingTravelCommerceCartService()
  • Method Details

    • addToCart

      public CommerceCartModification addToCart(CommerceCartParameter parameter) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      addToCart in interface de.hybris.platform.commerceservices.order.CommerceCartService
      Overrides:
      addToCart in class de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartService
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • setUnit

      protected void setUnit(CommerceCartParameter parameter)
      Sets unit.
      Parameters:
      parameter - the parameter
    • addAutopickProductsForTransportOfferings

      protected void addAutopickProductsForTransportOfferings(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      For each transport offering, add each product of the child bundles to the cart with qty 1, if those child bundles have autopick as selection criteria.
      Parameters:
      bundleEntryGroupNo - the bundle entry group number
      transportOfferingModels - the list of transport offerings
      travellerModel - the traveller
      modificationList - the list of commerce cart modifications
      childTemplate - the child templates
      autoPickProduct - the autoPickProduct
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • addAutoPickProductsToCart

      public List<CommerceCartModification> addAutoPickProductsToCart(ProductModel productModel, String bundleTemplateId, int bundleEntryGroupNo) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add the autoPickProduct to the cart.
      Specified by:
      addAutoPickProductsToCart in interface TravelCommerceCartService
      Overrides:
      addAutoPickProductsToCart in class DefaultTravelCommerceCartService
      Parameters:
      productModel - the product
      bundleTemplateId - the bundle template Id
      bundleEntryGroupNo - the bundle entry group number
      Returns:
      the list of commerce cart modifications
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addAutopickProductsForRoute

      protected void addAutopickProductsForRoute(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravelRouteModel travelRouteModel, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      For each route, add each product of the child bundles to the cart with qty 1, if those child bundles have autopick as selection criteria. Since we don't have routes in Pros, the priceLevel is set to default.
      Overrides:
      addAutopickProductsForRoute in class DefaultTravelCommerceCartService
      Parameters:
      bundleEntryGroupNo - the bundle entry group number
      transportOfferingModels - the list of transport offerings
      travelRouteModel - the travel route
      travellerModel - the traveller
      modificationList - the list of commerce cart modifications
      childTemplate - the child templates
      autoPickProduct - the autoPickProduct
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addPerLegBundleProductToCart

      public List<CommerceCartModification> addPerLegBundleProductToCart(String bundleTemplateId, int solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add per leg bundle product to cart list. Sets the solutionId for which the product belongs.
      Specified by:
      addPerLegBundleProductToCart in interface ShoppingTravelCommerceCartService
      Parameters:
      bundleTemplateId - the bundle template id
      solutionId - the solution id
      Returns:
      the list
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • addAutopickPerLegProducts

      protected void addAutopickPerLegProducts(List<TransportOfferingModel> transportOfferingModels, TravelRouteModel travelRouteModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add autopick per leg products to the cart. For each product sets the solutionId for which the product belongs.
      Parameters:
      transportOfferingModels - the transport offering models
      travelRouteModel - the travel route model
      modificationList - the modification list
      childTemplate - the child template
      autoPickProduct - the auto pick product
      solutionId - the solution id
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • addAutoPickProductsToCart

      public List<CommerceCartModification> addAutoPickProductsToCart(ProductModel productModel, String bundleTemplateId, int bundleEntryGroupNo, int solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add the autoPickProduct to the cart. Sets the solutionId to the product.
      Specified by:
      addAutoPickProductsToCart in interface ShoppingTravelCommerceCartService
      Parameters:
      productModel - the product
      bundleTemplateId - the bundle template Id
      bundleEntryGroupNo - the bundle entry group number
      Returns:
      the list of commerce cart modifications
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addAutopickProductsForTransportOfferings

      protected void addAutopickProductsForTransportOfferings(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      For each transport offering, add each product of the child bundles to the cart with qty 1, if those child bundles have autopick as selection criteria.
      Parameters:
      bundleEntryGroupNo - the bundle entry group number
      transportOfferingModels - the list of transport offerings
      travellerModel - the traveller
      modificationList - the list of commerce cart modifications
      childTemplate - the child templates
      autoPickProduct - the autoPickProduct
      solutionId - the solution id
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • getCommerceCartParameter

      protected CommerceCartParameter getCommerceCartParameter(BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId, Set<Integer> singleton)
      Gets commerce cart parameter.
      Parameters:
      childTemplate - the child template
      autoPickProduct - the auto pick product
      solutionId - the solution id
      singleton - the singleton
      Returns:
      the commerce cart parameter
    • addAutopickProductsForRoute

      protected void addAutopickProductsForRoute(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravelRouteModel travelRouteModel, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      For each route, add each product of the child bundles to the cart with qty 1, if those child bundles have autopick as selection criteria. Since we don't have routes in Pros, the priceLevel is set to default.
      Parameters:
      bundleEntryGroupNo - the bundle entry group number
      transportOfferingModels - the list of transport offerings
      travelRouteModel - the travel route
      travellerModel - the traveller
      modificationList - the list of commerce cart modifications
      childTemplate - the child templates
      autoPickProduct - the autoPickProduct
      solutionId - the solution id
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • getUnitService

      protected de.hybris.platform.product.UnitService getUnitService()
      Gets unit service.
      Returns:
      the unit service
    • setUnitService

      public void setUnitService(de.hybris.platform.product.UnitService unitService)
      Sets unit service.
      Parameters:
      unitService - the unit service
    • getShoppingService

      protected ShoppingService getShoppingService()
      Gets shopping service.
      Returns:
      the shopping service
    • setShoppingService

      public void setShoppingService(ShoppingService shoppingService)
      Sets shopping service.
      Parameters:
      shoppingService - the shopping service