public class DefaultFinancialBundleCommerceCartService extends DefaultSubscriptionCommerceCartService implements FSCommerceCartService
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CART_ENTRY |
protected static java.lang.String |
MASTER_CART |
protected static int |
NO_BUNDLE |
| Constructor and Description |
|---|
DefaultFinancialBundleCommerceCartService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAutoPickProductsToCart(CommerceCartParameter commerceCartParameter)
Add auto-pick products to the bundle in the cart.
|
protected void |
addAutoPickProductToCart(CommerceCartParameter commerceCartParameter,
BundleTemplateModel leafComponent) |
CommerceCartModification |
addToCart(CommerceCartParameter parameter) |
java.lang.String |
checkAndGetReasonForDisabledProductInComponent(CartModel masterCart,
ProductModel product,
BundleTemplateModel bundleTemplate,
int bundleNo,
boolean ignoreCurrentProducts)
Checks if the given
product which is not yet added to the cart/bundle needs to be disabled within a
component. |
protected void |
checkAutoPickRemoval(CartEntryModel cartEntry) |
boolean |
checkIsComponentEditable(CartModel masterCart,
BundleTemplateModel bundleTemplate,
int bundleNo)
Check is component editable boolean.
|
boolean |
checkIsComponentSelectionCriteriaMet(CartModel masterCart,
BundleTemplateModel bundleTemplate,
int bundleNo)
Check is component selection criteria met boolean.
|
protected boolean |
checkIsEntryRemovable(CartEntryModel cartEntry) |
boolean |
checkIsEntryRemoveable(CartEntryModel entryToUpdate)
Check is entry removeable boolean.
|
boolean |
checkIsEntryUpdateable(CartEntryModel cartEntry)
Check is entry updateable boolean.
|
protected void |
checkIsSelectionCriteriaNotExceeded(CartModel masterCart,
BundleTemplateModel bundleTemplate,
int bundleNo) |
protected void |
checkSelectionCriteriaNotUnderThreshold(CartEntryModel cartEntry) |
protected OrderEntryDao |
getBundleCartEntryDao() |
protected <any> |
getBundleComponentEditableChecker() |
protected BundleRuleService |
getBundleRuleService() |
protected BundleTemplateService |
getBundleTemplateService() |
java.util.List<CartEntryModel> |
getCartEntriesForComponentInBundle(CartModel masterCart,
BundleTemplateModel component,
int bundleNo)
Gets the list of
CartEntryModel for component and bundleNo. |
protected java.lang.String |
getDisablingReason(CartModel masterCart,
ProductModel product,
BundleTemplateModel bundleTemplate,
int bundleNo,
boolean ignoreCurrentProducts) |
protected java.lang.Integer |
getGroupNumberForLeafComponent(CommerceCartParameter commerceCartParameter) |
protected L10NService |
getL10NService() |
protected OrderEntryModifiableChecker |
getOrderEntryModifiableChecker() |
protected <any> |
getRemovableChecker() |
protected java.lang.String |
getSelectionCriterionMessage(CartModel masterCart,
BundleTemplateModel bundleTemplate,
int bundleNo) |
void |
setBundleCartEntryDao(OrderEntryDao bundleCartEntryDao) |
void |
setBundleComponentEditableChecker(<any> bundleComponentEditableChecker) |
void |
setBundleRuleService(BundleRuleService bundleRuleService) |
void |
setBundleTemplateService(BundleTemplateService bundleTemplateService) |
protected void |
setCartEntriesInSameBundleToNotCalculated(AbstractOrderEntryModel sourceEntry) |
void |
setL10NService(L10NService l10NService) |
void |
setOrderEntryModifiableChecker(OrderEntryModifiableChecker orderEntryModifiableChecker) |
void |
setRemovableChecker(<any> removeableChecker) |
protected void |
updateLastModifiedEntriesList(CartModel masterCart,
java.util.List<CommerceCartModification> modifications) |
CommerceCartModification |
updateQuantityForCartEntry(CommerceCartParameter parameter) |
protected static final int NO_BUNDLE
protected static final java.lang.String CART_ENTRY
protected static final java.lang.String MASTER_CART
public DefaultFinancialBundleCommerceCartService()
public CommerceCartModification addToCart(CommerceCartParameter parameter) throws CommerceCartModificationException
CommerceCartModificationExceptionpublic CommerceCartModification updateQuantityForCartEntry(CommerceCartParameter parameter) throws CommerceCartModificationException
CommerceCartModificationExceptionprotected void checkAutoPickRemoval(CartEntryModel cartEntry) throws CommerceCartModificationException
CommerceCartModificationExceptionprotected void checkSelectionCriteriaNotUnderThreshold(CartEntryModel cartEntry) throws CommerceCartModificationException
CommerceCartModificationExceptionprotected void setCartEntriesInSameBundleToNotCalculated(AbstractOrderEntryModel sourceEntry)
protected void updateLastModifiedEntriesList(CartModel masterCart, java.util.List<CommerceCartModification> modifications)
protected void addAutoPickProductsToCart(CommerceCartParameter commerceCartParameter) throws CommerceCartModificationException
CommerceCartModificationExceptionprotected void addAutoPickProductToCart(CommerceCartParameter commerceCartParameter, BundleTemplateModel leafComponent) throws CommerceCartModificationException
CommerceCartModificationExceptionprotected java.lang.Integer getGroupNumberForLeafComponent(CommerceCartParameter commerceCartParameter)
public java.util.List<CartEntryModel> getCartEntriesForComponentInBundle(CartModel masterCart, BundleTemplateModel component, int bundleNo)
FSCommerceCartServiceCartEntryModel for component and bundleNo.getCartEntriesForComponentInBundle in interface FSCommerceCartServicemasterCart - the master cart the bundle is incomponent - the component for which the cartentries should be foundbundleNo - the bundleNo for which the cartentries should be foundpublic java.lang.String checkAndGetReasonForDisabledProductInComponent(CartModel masterCart, ProductModel product, BundleTemplateModel bundleTemplate, int bundleNo, boolean ignoreCurrentProducts)
FSCommerceCartServiceproduct which is not yet added to the cart/bundle needs to be disabled within a
component. A product needs to be disabled if a disable rule is applicable (see description of method
isProductDisabledInBundle() above) and/or the selection criteria of the component is exceeded. If the given
product needs to be disabled the reason is returned as String. If ignoreCurrentProducts
is enabled, then all product of the current component will be ignored when finding disable rules.checkAndGetReasonForDisabledProductInComponent in interface FSCommerceCartServicemasterCart - the master cart the bundle is inproduct - the product which is to be added to the given bundleNobundleTemplate - the component to which the given product is linkedbundleNo - the number of the bundle the given bundleTemplate and product belong to or will be addedignoreCurrentProducts - if current products should be ignoredString why the given product needs to be disabled, otherwise nullpublic boolean checkIsEntryUpdateable(CartEntryModel cartEntry)
FSCommerceCartServicecheckIsEntryUpdateable in interface FSCommerceCartServicecartEntry - the order entrypublic boolean checkIsEntryRemoveable(CartEntryModel entryToUpdate)
FSCommerceCartServicecheckIsEntryRemoveable in interface FSCommerceCartServiceentryToUpdate - the entry to updatepublic boolean checkIsComponentEditable(CartModel masterCart, BundleTemplateModel bundleTemplate, int bundleNo)
FSCommerceCartServicecheckIsComponentEditable in interface FSCommerceCartServicemasterCart - the master cartbundleTemplate - the bundle templatebundleNo - the bundle nopublic boolean checkIsComponentSelectionCriteriaMet(CartModel masterCart, BundleTemplateModel bundleTemplate, int bundleNo)
FSCommerceCartServicecheckIsComponentSelectionCriteriaMet in interface FSCommerceCartServicemasterCart - the master cartbundleTemplate - the bundle templatebundleNo - the bundle noprotected java.lang.String getSelectionCriterionMessage(CartModel masterCart, BundleTemplateModel bundleTemplate, int bundleNo)
protected java.lang.String getDisablingReason(CartModel masterCart, ProductModel product, BundleTemplateModel bundleTemplate, int bundleNo, boolean ignoreCurrentProducts)
protected void checkIsSelectionCriteriaNotExceeded(CartModel masterCart, BundleTemplateModel bundleTemplate, int bundleNo) throws CommerceCartModificationException
CommerceCartModificationExceptionprotected boolean checkIsEntryRemovable(CartEntryModel cartEntry)
protected BundleTemplateService getBundleTemplateService()
public void setBundleTemplateService(BundleTemplateService bundleTemplateService)
protected <any> getRemovableChecker()
public void setRemovableChecker(<any> removeableChecker)
protected L10NService getL10NService()
public void setL10NService(L10NService l10NService)
protected OrderEntryDao getBundleCartEntryDao()
public void setBundleCartEntryDao(OrderEntryDao bundleCartEntryDao)
protected BundleRuleService getBundleRuleService()
public void setBundleRuleService(BundleRuleService bundleRuleService)
protected OrderEntryModifiableChecker getOrderEntryModifiableChecker()
public void setOrderEntryModifiableChecker(OrderEntryModifiableChecker orderEntryModifiableChecker)
protected <any> getBundleComponentEditableChecker()
public void setBundleComponentEditableChecker(<any> bundleComponentEditableChecker)
Copyright © 2018 SAP SE. All Rights Reserved.