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.
-
Field Summary
Fields inherited from class de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartService
ESTIMATED_TAXES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAutopickPerLegProducts(List<TransportOfferingModel> transportOfferingModels, TravelRouteModel travelRouteModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId) Add autopick per leg products to the cart.protected voidaddAutopickProductsForRoute(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravelRouteModel travelRouteModel, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct) 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.protected voidaddAutopickProductsForRoute(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravelRouteModel travelRouteModel, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId) 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.protected voidaddAutopickProductsForTransportOfferings(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct) 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.protected voidaddAutopickProductsForTransportOfferings(int bundleEntryGroupNo, List<TransportOfferingModel> transportOfferingModels, TravellerModel travellerModel, List<CommerceCartModification> modificationList, BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId) 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.addAutoPickProductsToCart(ProductModel productModel, String bundleTemplateId, int bundleEntryGroupNo) Add the autoPickProduct to the cart.addAutoPickProductsToCart(ProductModel productModel, String bundleTemplateId, int bundleEntryGroupNo, int solutionId) Add the autoPickProduct to the cart.addPerLegBundleProductToCart(String bundleTemplateId, int solutionId) Add per leg bundle product to cart list.addToCart(CommerceCartParameter parameter) protected CommerceCartParametergetCommerceCartParameter(BundleTemplateModel childTemplate, ProductModel autoPickProduct, int solutionId, Set<Integer> singleton) Gets commerce cart parameter.protected ShoppingServiceGets shopping service.protected de.hybris.platform.product.UnitServiceGets unit service.voidsetShoppingService(ShoppingService shoppingService) Sets shopping service.protected voidsetUnit(CommerceCartParameter parameter) Sets unit.voidsetUnitService(de.hybris.platform.product.UnitService unitService) Sets unit service.Methods inherited from class de.hybris.platform.travelservices.order.impl.DefaultTravelCommerceCartService
addAutopickPerLegProducts, addAutopickProductsForTransportOfferings, addPerLegBundleProductToCart, addPropertiesToCartEntry, addSelectedAccommodationToCart, checkBundleAndCategory, checkTransportOfferings, checkTraveller, createSelectedAccommodationModel, getBoundIdFromEntry, getBundleTemplateService, getCartService, getCommerceCartParameter, getOfferGroupToOriginDestinationMapping, getOrderEntriesForCategory, getSessionService, getTransportOfferingService, getTravelCartService, getTravelCommercePriceService, getTravelKeyGeneratorService, getTravellerService, getTravelRouteService, isTravellerEligibleForProduct, normalizeEntryNumbers, persistProperties, populateActiveFlagForEntry, populateAmendStatusForEntry, populateBoundId, populatePriceLevelForEntry, populateTransportOfferingForEntry, populateTravellerForEntry, populateTravelRouteForEntry, removeCartEntriesForBoundId, removeCartEntriesForMinODRefNumber, removeCartEntriesForODRefNumber, removeCartEntryGroupNumbers, removeEntryGroupsFromCart, removeFeeOrderEntries, removeSelectedAccommodationFromCart, removeTravellers, removeTravelOrderEntries, setBundleTemplateService, setCartService, setEntryAsCalculatedAndInitializePriceLevel, setOfferGroupToOriginDestinationMapping, setSessionService, setTransportOfferingService, setTravelCartService, setTravelCommercePriceService, setTravelKeyGeneratorService, setTravellerService, setTravelRouteService, updateCartEntryWithTravelDetails, updateCartEntryWithTravelDetails, updateCartEntryWithTravelDetailsMethods inherited from class de.hybris.platform.subscriptionservices.subscription.impl.DefaultSubscriptionCommerceCartService
addOneRecurringFrequency, checkMasterCart, checkQuantityToAdd, checkQuantityToAdd, createChildCartForBillingTime, getAvailableStockLevel, getBaseStoreService, getBillingFrequenciesForMasterEntry, getBillingTimeForCode, getBillingTimeService, getCartEntryToBeUpdated, getChildCartForBillingTime, getCommercePriceService, getCommerceStockService, getMasterCartBillingTimeCode, getMasterCartForCartEntry, getSubscriptionCommerceCartStrategy, getSubscriptionProductService, getSubscriptionProductStockQuantity, isMasterCart, recalculateCart, recalculateCart, removeAllEntries, setBaseStoreService, setBillingTimeService, setCommercePriceService, setCommerceStockService, setMasterCartBillingTimeCode, setSubscriptionCommerceCartStrategy, setSubscriptionProductService, setSubscriptionProductStockQuantity, useBillingFrequencyForProductMethods inherited from class de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartService
addToCart, addToCart, afterCalculate, beforeCalculate, calculateCart, calculateCart, configureCartEntry, estimateTaxes, estimateTaxes, getBaseSiteService, getCartForCodeAndUser, getCartForGuidAndSite, getCartForGuidAndSiteAndUser, getCartsForSiteAndUser, getCartValidationStrategy, getCommerceAddToCartStrategy, getCommerceCartCalculationStrategy, getCommerceCartDao, getCommerceCartEstimateTaxesStrategy, getCommerceCartHashCalculationStrategy, getCommerceCartMergingStrategy, getCommerceCartMetadataUpdateStrategy, getCommerceCartRestorationStrategy, getCommerceCartSplitStrategy, getCommerceRemoveEntriesStrategy, getCommerceUpdateCartEntryStrategy, getModelService, getProductConfigurationStrategy, getRemoveEntryGroupStrategy, getStaleCartRemovalStrategy, mergeCarts, removeAllEntries, removeEntryGroup, removeStaleCarts, removeStaleCarts, restoreCart, restoreCart, setBaseSiteService, setCartValidationStrategy, setCommerceAddToCartStrategy, setCommerceCartCalculationStrategy, setCommerceCartDao, setCommerceCartEstimateTaxesStrategy, setCommerceCartHashCalculationStrategy, setCommerceCartMergingStrategy, setCommerceCartMetadataUpdateStrategy, setCommerceCartRestorationStrategy, setCommerceCartSplitStrategy, setCommerceRemoveEntriesStrategy, setCommerceUpdateCartEntryStrategy, setModelService, setProductConfigurationStrategy, setRemoveEntryGroupStrategy, setStaleCartRemovalStrategy, split, split, updateCartMetadata, updatePointOfServiceForCartEntry, updatePointOfServiceForCartEntry, updateQuantityForCartEntry, updateQuantityForCartEntry, updateToShippingModeForCartEntry, updateToShippingModeForCartEntry, validateCart, validateCartMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.commerceservices.order.CommerceCartService
addToCart, addToCart, calculateCart, calculateCart, configureCartEntry, estimateTaxes, estimateTaxes, getCartForCodeAndUser, getCartForGuidAndSite, getCartForGuidAndSiteAndUser, getCartsForSiteAndUser, mergeCarts, recalculateCart, recalculateCart, removeAllEntries, removeAllEntries, removeEntryGroup, removeStaleCarts, removeStaleCarts, restoreCart, restoreCart, split, split, updateCartMetadata, updatePointOfServiceForCartEntry, updatePointOfServiceForCartEntry, updateQuantityForCartEntry, updateQuantityForCartEntry, updateToShippingModeForCartEntry, updateToShippingModeForCartEntry, validateCart, validateCartMethods inherited from interface de.hybris.platform.subscriptionservices.subscription.SubscriptionCommerceCartService
checkMasterCart, checkQuantityToAdd, createChildCartForBillingTime, getBillingFrequenciesForMasterEntry, getChildCartForBillingTime, getMasterCartBillingTimeCode, getMasterCartForCartEntry
-
Constructor Details
-
DefaultShoppingTravelCommerceCartService
public DefaultShoppingTravelCommerceCartService()
-
-
Method Details
-
addToCart
public CommerceCartModification addToCart(CommerceCartParameter parameter) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Specified by:
addToCartin interfacede.hybris.platform.commerceservices.order.CommerceCartService- Overrides:
addToCartin classde.hybris.platform.commerceservices.order.impl.DefaultCommerceCartService- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
setUnit
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 numbertransportOfferingModels- the list of transport offeringstravellerModel- the travellermodificationList- the list of commerce cart modificationschildTemplate- the child templatesautoPickProduct- 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:
addAutoPickProductsToCartin interfaceTravelCommerceCartService- Overrides:
addAutoPickProductsToCartin classDefaultTravelCommerceCartService- Parameters:
productModel- the productbundleTemplateId- the bundle template IdbundleEntryGroupNo- 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:
addAutopickProductsForRoutein classDefaultTravelCommerceCartService- Parameters:
bundleEntryGroupNo- the bundle entry group numbertransportOfferingModels- the list of transport offeringstravelRouteModel- the travel routetravellerModel- the travellermodificationList- the list of commerce cart modificationschildTemplate- the child templatesautoPickProduct- 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:
addPerLegBundleProductToCartin interfaceShoppingTravelCommerceCartService- Parameters:
bundleTemplateId- the bundle template idsolutionId- 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 modelstravelRouteModel- the travel route modelmodificationList- the modification listchildTemplate- the child templateautoPickProduct- the auto pick productsolutionId- 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:
addAutoPickProductsToCartin interfaceShoppingTravelCommerceCartService- Parameters:
productModel- the productbundleTemplateId- the bundle template IdbundleEntryGroupNo- 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 numbertransportOfferingModels- the list of transport offeringstravellerModel- the travellermodificationList- the list of commerce cart modificationschildTemplate- the child templatesautoPickProduct- the autoPickProductsolutionId- 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 templateautoPickProduct- the auto pick productsolutionId- the solution idsingleton- 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 numbertransportOfferingModels- the list of transport offeringstravelRouteModel- the travel routetravellerModel- the travellermodificationList- the list of commerce cart modificationschildTemplate- the child templatesautoPickProduct- the autoPickProductsolutionId- 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
Gets shopping service.- Returns:
- the shopping service
-
setShoppingService
Sets shopping service.- Parameters:
shoppingService- the shopping service
-