public class BundleAddToCartMethodHook extends java.lang.Object implements CommerceAddToCartMethodHook
CommerceCartService| Constructor and Description |
|---|
BundleAddToCartMethodHook() |
public void beforeAddToCart(CommerceCartParameter parameter) throws CommerceCartModificationException
CommerceAddToCartMethodHookbeforeAddToCart in interface CommerceAddToCartMethodHookparameter - A parameter objectCommerceCartModificationExceptionpublic void afterAddToCart(CommerceCartParameter parameter, CommerceCartModification result) throws CommerceCartModificationException
CommerceAddToCartMethodHookafterAddToCart in interface CommerceAddToCartMethodHookparameter - A parameter objectresult - A return value of addToCart methodCommerceCartModificationException@Deprecated protected void assignBundleNo(AbstractOrderEntryModel entry)
bundleNo to the entry. For new bundles next free bundleNo is used. For existing bundles the value
is taken from another entry of the bundle.
The method has been introduced for compatibility to old (bundleNo-based) implementation.
entry - entry to set bundle noAbstractOrderEntryModel.getBundleNo()@Deprecated protected java.lang.Integer getNextFreeBundleNo(AbstractOrderModel order)
protected java.util.List<AbstractOrderEntryModel> getBundleEntries(AbstractOrderModel cart, java.util.Collection<java.lang.Integer> entryGroupNumbers)
cart - the order where to take entries fromentryGroupNumbers - number of any group of the bundlejava.lang.IllegalArgumentException - if entryGroupNumber is not foundprotected boolean startingNewBundle(CommerceCartParameter parameter) throws CommerceCartModificationException
protected boolean isBundledEntry(CommerceCartParameter parameter) throws CommerceCartModificationException
parameter - entry definitionCommerceCartModificationExceptionprotected EntryGroup getGroupForComponent(EntryGroup root, java.lang.String externalReferenceId)
protected void addEntryGroupsToEntry(AbstractOrderEntryModel entry, java.util.Collection<java.lang.Integer> entryGroupNumbers)
protected void addToBundle(CommerceCartParameter parameter, AbstractOrderEntryModel entry) throws CommerceCartModificationException
protected void checkBundleParameters(CommerceCartParameter parameter) throws CommerceCartModificationException
protected void checkIsProductInComponentProductList(CommerceCartParameter parameter) throws CommerceCartModificationException
protected void checkIsSoldIndividually(CommerceCartParameter parameter) throws CommerceCartModificationException
protected void checkCanBeAddedToComponent(CommerceCartParameter parameter) throws CommerceCartModificationException
protected void checkIsProductDisabledByRules(CommerceCartParameter parameter) throws CommerceCartModificationException
@Deprecated protected int getBundleNo(CommerceCartParameter parameter) throws CommerceCartModificationException
protected EntryGroup getBundleEntryGroup(CommerceCartParameter parameter) throws CommerceCartModificationException
protected BundleTemplateModel getComponent(CommerceCartParameter parameter) throws CommerceCartModificationException
protected L10NService getL10NService()
public void setL10NService(L10NService l10NService)
protected AbstractBundleComponentEditableChecker<CartModel> getBundleComponentEditableChecker()
public void setBundleComponentEditableChecker(AbstractBundleComponentEditableChecker<CartModel> bundleComponentEditableChecker)
protected BundleRuleService getBundleRuleService()
public void setBundleRuleService(BundleRuleService bundleRuleService)
protected CartService getCartService()
public void setCartService(CartService cartService)
protected BundleCartHookHelper getBundleCartHookHelper()
public void setBundleCartHookHelper(BundleCartHookHelper bundleCartHookHelper)
protected BundleTemplateService getBundleTemplateService()
public void setBundleTemplateService(BundleTemplateService bundleTemplateService)
protected EntryGroupService getEntryGroupService()
public void setEntryGroupService(EntryGroupService entryGroupService)
protected BundleCartValidator getBundleCartValidator()
public void setBundleCartValidator(BundleCartValidator bundleCartValidator)
Copyright © 2018 SAP SE. All Rights Reserved.