public class SubscriptionUpdateCartEntryHook extends java.lang.Object implements CommerceUpdateCartEntryHook
| Constructor and Description |
|---|
SubscriptionUpdateCartEntryHook() |
public void beforeUpdateCartEntry(CommerceCartParameter parameter)
CommerceUpdateCartEntryHookbeforeUpdateCartEntry in interface CommerceUpdateCartEntryHookpublic void afterUpdateCartEntry(CommerceCartParameter parameter, CommerceCartModification result)
CommerceUpdateCartEntryHookafterUpdateCartEntry in interface CommerceUpdateCartEntryHookprotected void normalizeEntriesInChildCarts(CartModel cart)
protected AbstractOrderEntryModel getEntry(CartModel cart, long entryNumber)
protected void removeEmptyChildCarts(CartModel cartModel)
protected void removeOrphanChildEntries(CartModel cartModel)
afterUpdateCartEntry(CommerceCartParameter, CommerceCartModification) gets
a fake entry, because the original one is already removed at that moment.
So the fake instance does not have any child entries. Here we search within the child carts what entries have got
lost its AbstractOrderEntryModel.getMasterEntry(). That would mean the master entry has been removed, and
the child entry should be removed as well.
WARNING Be careful optimizing the refresh calls - the system is very sensitive to it.
cartModel - master cartprotected boolean isMasterCart(CartModel cartModel)
protected SubscriptionProductService getSubscriptionProductService()
public void setSubscriptionProductService(SubscriptionProductService subscriptionProductService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected CommerceCartCalculationStrategy getCalculationStrategy()
public void setCalculationStrategy(CommerceCartCalculationStrategy calculationStrategy)
protected SubscriptionCommerceCartStrategy getSubscriptionCommerceCartStrategy()
public void setSubscriptionCommerceCartStrategy(SubscriptionCommerceCartStrategy subscriptionCommerceCartStrategy)
Copyright © 2018 SAP SE. All Rights Reserved.