Class DefaultAcceleratorCheckoutService
- java.lang.Object
-
- de.hybris.platform.acceleratorservices.order.impl.DefaultAcceleratorCheckoutService
-
- All Implemented Interfaces:
AcceleratorCheckoutService
public class DefaultAcceleratorCheckoutService extends java.lang.Object implements AcceleratorCheckoutService
Accelerator specific implementation ofDefaultCommerceCheckoutService
-
-
Constructor Summary
Constructors Constructor Description DefaultAcceleratorCheckoutService()
-
Method Summary
-
-
-
Method Detail
-
getConsolidatedPickupOptions
public java.util.List<PointOfServiceDistanceData> getConsolidatedPickupOptions(CartModel cartModel)
Description copied from interface:AcceleratorCheckoutServiceGets the points of service for item pickup for a cart- Specified by:
getConsolidatedPickupOptionsin interfaceAcceleratorCheckoutService- Parameters:
cartModel- the cart- Returns:
- a
ListofPointOfServiceDistanceData
-
consolidateCheckoutCart
public java.util.List<CommerceCartModification> consolidateCheckoutCart(CartModel cartModel, PointOfServiceModel consolidatedPickupPointModel) throws CommerceCartModificationException
Description copied from interface:AcceleratorCheckoutServiceRuns calculation again and updates cart- Specified by:
consolidateCheckoutCartin interfaceAcceleratorCheckoutService- Parameters:
cartModel- the cartconsolidatedPickupPointModel- the point of service- Returns:
- any unsuccessful modifications that made to the cart (i.e. due to very, very recent stock changes)
- Throws:
CommerceCartModificationException- when the cart could not be modified
-
createCartParameter
protected CommerceCartParameter createCartParameter(CartModel cartModel, AbstractOrderEntryModel entryToRemove, long qty)
-
getEntriesToConsolidate
protected java.util.List<AbstractOrderEntryModel> getEntriesToConsolidate(CartModel cartModel, PointOfServiceModel consolidatedPickupPointModel, java.util.List<AbstractOrderEntryModel> entriesToBeRemovedDueToPOS, java.util.List<AbstractOrderEntryModel> consolidatedEntriesToBeRemoved, java.util.List<CommerceCartModification> unsuccessfulModifications) throws CommerceCartModificationException
Gets the consolidate entries.- Parameters:
cartModel- the cart modelconsolidatedPickupPointModel- the consolidated pickup point modelentriesToBeRemovedDueToPOS- the entries to be removed due to out of stock in POSconsolidatedEntriesToBeRemoved- the entries that has the same product but different POS from consolidate POS.unsuccessfulModifications- the unsuccessful modifications- Returns:
- the entries to consolidate. Key: the entry that has the same POS as consolidate POS. Value: the entries that has the same product as the entry in the key, but different POS.
- Throws:
CommerceCartModificationException- the commerce cart modification exception
-
getAnchorEntryToConsolidate
protected AbstractOrderEntryModel getAnchorEntryToConsolidate(AbstractOrderEntryModel entry, CartModel cartModel, PointOfServiceModel consolidatedPickupPointModel)
Gets the anchor entry to consolidate.- Parameters:
entry- the entrycartModel- the cart modelconsolidatedPickupPointModel- the consolidated pickup point model- Returns:
- the anchor entry to consolidate
-
updatePOS
protected void updatePOS(CartModel cartModel, PointOfServiceModel consolidatedPickupPointModel, java.util.List<CommerceCartModification> unsuccessfulModifications, AbstractOrderEntryModel entry) throws CommerceCartModificationException
-
isInStock
protected boolean isInStock(ProductModel productModel, PointOfServiceModel pointOfServiceModel)
-
getExistingAnchorEntryByProduct
protected AbstractOrderEntryModel getExistingAnchorEntryByProduct(ProductModel product, java.util.List<AbstractOrderEntryModel> entriesToConsolidate)
-
calculateProductQtyInCart
protected long calculateProductQtyInCart(ProductModel productModel, CartModel cartModel)
-
getPickupPointOfServiceConsolidationStrategy
protected PickupPointOfServiceConsolidationStrategy getPickupPointOfServiceConsolidationStrategy()
-
setPickupPointOfServiceConsolidationStrategy
public void setPickupPointOfServiceConsolidationStrategy(PickupPointOfServiceConsolidationStrategy pickupPointOfServiceConsolidationStrategy)
-
getCartService
protected CartService getCartService()
-
setCartService
public void setCartService(CartService cartService)
-
getCommerceCartService
protected CommerceCartService getCommerceCartService()
-
setCommerceCartService
public void setCommerceCartService(CommerceCartService commerceCartService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getCommerceStockService
protected CommerceStockService getCommerceStockService()
-
setCommerceStockService
public void setCommerceStockService(CommerceStockService commerceStockService)
-
getBaseStoreService
protected BaseStoreService getBaseStoreService()
-
setBaseStoreService
public void setBaseStoreService(BaseStoreService baseStoreService)
-
-