CommerceCartService and other services' methods.@Deprecated public interface BundleCommerceCartService extends SubscriptionCommerceCartService
SubscriptionCommerceCartService to handle products and subscription products that are sold as
part of a bundle as well as just standalone. It is mainly driven by a new bundleNo indicating the
specific bundle number for each cart entry and a bundleTemplate indicating the component - so the
detailed level of a package - to which the product has been added.
On a method level it adds or overrides methods in order to pass that bundle information to add, update (incl. remove)
or calculate operations as well as additional checks have been implemented in order to verify if a certain
product/component is updateable or removable and it also allows for identifying problems in a bundle.| Modifier and Type | Method and Description |
|---|---|
java.util.List<CommerceCartModification> |
addToCart(CartModel masterCartModel,
ProductModel productModel,
long quantityToAdd,
UnitModel unit,
boolean forceNewEntry,
int bundleNo,
BundleTemplateModel bundleTemplateModel,
boolean removeCurrentProducts)
Deprecated.
Adds the (existing)
ProductModel in the given UnitModel and with the given quantity
to the (existing) CartModel. |
java.util.List<CommerceCartModification> |
addToCart(CartModel masterCartModel,
ProductModel productModel,
long quantity,
UnitModel unit,
boolean forceNewEntry,
int bundleNo,
BundleTemplateModel bundleTemplateModel,
boolean removeCurrentProducts,
java.lang.String xmlProduct)
Deprecated.
|
java.util.List<CommerceCartModification> |
addToCart(CartModel masterCartModel,
UnitModel unit,
int bundleNo,
ProductModel productModel1,
BundleTemplateModel bundleTemplateModel1,
ProductModel productModel2,
BundleTemplateModel bundleTemplateModel2)
Deprecated.
Since ages (at least from 5.1)
|
java.util.List<CommerceCartModification> |
addToCart(CartModel masterCartModel,
UnitModel unit,
int bundleNo,
ProductModel productModel1,
BundleTemplateModel bundleTemplateModel1,
ProductModel productModel2,
BundleTemplateModel bundleTemplateModel2,
java.lang.String xmlProduct1,
java.lang.String xmlProduct2)
Deprecated.
Adds the (existing)
ProductModels productModel1 and productModel2 in the given
UnitModel and with quantity=1 to the (existing) multi-cart CartModel as new cart entries. |
java.lang.String |
checkAndGetReasonForDisabledProductInComponent(CartModel masterCart,
ProductModel product,
BundleTemplateModel bundleTemplate,
int bundleNo,
boolean ignoreCurrentProducts)
Deprecated.
Checks if the given
product which is not yet added to the cart/bundle needs to be disabled within a
component. |
java.lang.String |
checkAndGetReasonForNotRemovableEntry(CartEntryModel cartEntry)
Deprecated.
Checks whether the given
CartEntryModel could be removed from the bundle/cart (only a check, the cart is
not modified!) and returns the reason if the removal is not allowed. |
boolean |
checkIsComponentEditable(CartModel masterCart,
BundleTemplateModel bundleTemplate,
int bundleNo)
Deprecated.
Checks if the given component
bundleTemplate in given bundle bundleNo and
masterCart can be edited. |
boolean |
checkIsComponentSelectionCriteriaMet(CartModel masterCart,
BundleTemplateModel bundleTemplate,
int bundleNo)
Deprecated.
Checks if the selection criteria of the given component
bundleTemplate in given bundle
bundleNo and masterCart is met. |
boolean |
checkIsEntryRemovable(CartEntryModel cartEntry)
Deprecated.
Checks whether the given
CartEntryModel could be removed from the bundle/cart (only a check, the cart is
not modified!). |
boolean |
checkIsEntryUpdateable(CartEntryModel cartEntry)
Deprecated.
Checks whether the given
cartEntry can be updated. |
java.util.List<CartEntryModel> |
getCartEntriesForBundle(CartModel masterCart,
int bundleNo)
Deprecated.
Gets the list of for bundleNo.
|
java.util.List<CartEntryModel> |
getCartEntriesForComponentInBundle(CartModel masterCart,
BundleTemplateModel component,
int bundleNo)
Deprecated.
Gets the list of
CartEntryModel for component and bundleNo. |
java.util.List<CartEntryModel> |
getCartEntriesForProductInBundle(CartModel masterCart,
ProductModel product,
int bundleNo)
Deprecated.
Gets the list of
CartEntryModel for Products and bundleNo. |
BundleTemplateModel |
getFirstInvalidComponentInCart(CartModel masterCart)
Deprecated.
Checks the given
masterCart if there are invalid components in it. |
BillingTimeModel |
getMasterBillingTime()
Deprecated.
Get the master
BillingTimeModel |
void |
removeAllEntries(CartModel masterCartModel,
int bundleNo)
Deprecated.
Since 6.4 - use
CommerceCartService.removeEntryGroup(RemoveEntryGroupParameter) |
addToCart, addToCart, checkMasterCart, checkQuantityToAdd, createChildCartForBillingTime, getBillingFrequenciesForMasterEntry, getChildCartForBillingTime, getMasterCartBillingTimeCode, getMasterCartForCartEntryaddToCart, 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, validateCartjava.util.List<CommerceCartModification> addToCart(CartModel masterCartModel, ProductModel productModel, long quantityToAdd, UnitModel unit, boolean forceNewEntry, int bundleNo, BundleTemplateModel bundleTemplateModel, boolean removeCurrentProducts) throws CommerceCartModificationException
ProductModel in the given UnitModel and with the given quantity
to the (existing) CartModel. If an entry with the given product and given unit exists in the cart already,
then the given quantity is added to the quantity of this cart entry unless forceNewEntry
is set to true or a subscription product or a product, that is part of a bundle, is added. Dependent on the
parameter bundleNo the product is added to an existing or new bundle or treated as a standalone
product. In case a new bundle is created the method also adds auto-pick products to the cart if there are any
setup for the bundle template. After this the multi-cart is calculated.masterCartModel - the cart model. It must exist and it must be a master cart.productModel - the product model that will be added to the cartquantityToAdd - the quantity of the productunit - if null ProductService.getOrderableUnit(ProductModel) is used to determine the unitforceNewEntry - the force new entry if set to true, new cart entry will be created in any case. In case of subscription
products and products that are part of a bundle there will be always a new cart entrybundleNo - indicates to which bundle the product model shall be added (-1=create new bundle; 0=standalone
product/no bundle; >0=number of existing bundle)bundleTemplateModel - current version of the bundleTemplate model based on which the product is added to the cart. It will be
stored on the cart entry. If null the product will be treated as a standalone product and
the bundleNo must be 0 accordingly.removeCurrentProducts - whether to remove current productsCommerceCartModification that includes a statusCode and the
actual quantity of the products added to the cartCommerceCartModificationException - if the product is a base product OR the quantity is less than 1 or no usable unit was
found (only when given unit is also null) or any other reason the cart could
not be modified.java.util.List<CommerceCartModification> addToCart(CartModel masterCartModel, ProductModel productModel, long quantity, UnitModel unit, boolean forceNewEntry, int bundleNo, BundleTemplateModel bundleTemplateModel, boolean removeCurrentProducts, java.lang.String xmlProduct) throws CommerceCartModificationException
masterCartModel - productModel - quantity - unit - forceNewEntry - bundleNo - bundleTemplateModel - removeCurrentProducts - xmlProduct - CommerceCartModification that includes a statusCode and the
actual quantity of the products added to the cartCommerceCartModificationExceptionaddToCart(CartModel, ProductModel, long, UnitModel, boolean, int,
BundleTemplateModel, boolean)java.util.List<CommerceCartModification> addToCart(CartModel masterCartModel, UnitModel unit, int bundleNo, ProductModel productModel1, BundleTemplateModel bundleTemplateModel1, ProductModel productModel2, BundleTemplateModel bundleTemplateModel2, java.lang.String xmlProduct1, java.lang.String xmlProduct2) throws CommerceCartModificationException
ProductModels productModel1 and productModel2 in the given
UnitModel and with quantity=1 to the (existing) multi-cart CartModel as new cart entries. As this
method works for bundles only, both products must have a bundle template and must be part of an existing bundle or
a new bundle that is created during the addToCart. In case a new bundle is created the method also adds auto-pick
products to the cart if there are any setup for the bundle template. After this the multi-cart is calculated.masterCartModel - the cart model. It must exist and it must be a master cart.unit - if null ProductService.getOrderableUnit(ProductModel) is used to determine the unitbundleNo - indicates to which bundle the product model shall be added (-1=create new bundle; >0=number of existing
bundle; 0=standalone product/no bundle is not allowed here)productModel1 - the first product model that will be added to the cartbundleTemplateModel1 - current version of the bundleTemplate model based on which the first product is added to the cart. It
will be stored on the cart entry. The parameter cannot be null.productModel2 - the second product model that will be added to the cartbundleTemplateModel2 - current version of the bundleTemplate model based on which the second product is added to the cart. It
will be stored on the cart entry. The parameter cannot be null.xmlProduct1 - first product in xml formatxmlProduct2 - second product in xml formatCommerceCartModification that includes a statusCode and the
actual quantity of the products added to the cartCommerceCartModificationException - if the product is a base product OR the quantity is less than 1 or no usable unit was
found (only when given unit is also null) or the bundle parameters were
empty/wrong or any other reason the cart could not be modified.@Deprecated java.util.List<CommerceCartModification> addToCart(CartModel masterCartModel, UnitModel unit, int bundleNo, ProductModel productModel1, BundleTemplateModel bundleTemplateModel1, ProductModel productModel2, BundleTemplateModel bundleTemplateModel2) throws CommerceCartModificationException
masterCartModel - unit - bundleNo - productModel1 - bundleTemplateModel1 - productModel2 - bundleTemplateModel2 - List of CommerceCartModificationsCommerceCartModificationExceptionaddToCart(CartModel, UnitModel, int, ProductModel, BundleTemplateModel,
ProductModel, BundleTemplateModel, String, String)@Deprecated void removeAllEntries(CartModel masterCartModel, int bundleNo) throws CommerceCartModificationException
CommerceCartService.removeEntryGroup(RemoveEntryGroupParameter)CartModel and its child carts. The given CartModel must be a
master cart. All entries within the multi-cart (master + child carts) that belong to the same bundle identified by
the given bundleNo are removed from the multi cart.masterCartModel - the CartModel. It must exist and it must be a master cart.bundleNo - the number of the bundleCommerceCartModificationException - if the given CartModel is not a master cartboolean checkIsEntryRemovable(CartEntryModel cartEntry)
CartEntryModel could be removed from the bundle/cart (only a check, the cart is
not modified!). The check is based on the selectionCritera of the given cartEntry's component (bundle
template). If with the removal of the given cartEntry the lower limit of required product selections
would not be met any more, the check returns false, otherwise true.cartEntry - cart entry that is checked whether it can be removed from the cart/bundletrue if the given cartEntry can be removed from the cart, otherwise
falsejava.lang.String checkAndGetReasonForNotRemovableEntry(CartEntryModel cartEntry)
CartEntryModel could be removed from the bundle/cart (only a check, the cart is
not modified!) and returns the reason if the removal is not allowed. The check is based on the selectionCritera of
the given cartEntry's component (bundle template). If with the removal of the given
cartEntry the lower limit of required product selections would not be met any more, the check returns
the reason as String, otherwise null.cartEntry - cart entry that is checked whether it can be removed from the cart/bundleString why the given cartEntry cannot be removed, otherwise
nullboolean checkIsEntryUpdateable(CartEntryModel cartEntry)
cartEntry can be updated. Any cart entry CartEntryModel belonging to
a bundle BundleTemplateModel cannot be updated.cartEntry - cart Entry that is checkedtrue if given cartEntry can be update, otherwise falseboolean checkIsComponentEditable(CartModel masterCart, BundleTemplateModel bundleTemplate, int bundleNo)
bundleTemplate in given bundle bundleNo and
masterCart can be edited. The check is based on the selection dependencies of the given
bundleTemplate. In case the given bundleTemplate's selection criteria is of type
AutoPickBundleSelectionCriteriaModel, it is never editable.masterCart - the master cart the bundle is inbundleTemplate - the component that is checked whether it can be editedbundleNo - the number of the bundle the given bundleTemplate belongs totrue if the selection dependencies are fulfilled and the component can be edited, otherwise
falseboolean checkIsComponentSelectionCriteriaMet(CartModel masterCart, BundleTemplateModel bundleTemplate, int bundleNo)
bundleTemplate in given bundle
bundleNo and masterCart is met.masterCart - the master cart the bundle is inbundleTemplate - the component that is checked whether its selection criteria is metbundleNo - the number of the bundle the given bundleTemplate belongs totrue if given bundleTemplate's's selection criteria is met, otherwise
falsejava.lang.String checkAndGetReasonForDisabledProductInComponent(CartModel masterCart, ProductModel product, BundleTemplateModel bundleTemplate, int bundleNo, boolean ignoreCurrentProducts)
product 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.masterCart - 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
nulljava.util.List<CartEntryModel> getCartEntriesForProductInBundle(CartModel masterCart, ProductModel product, int bundleNo)
CartEntryModel for Products and bundleNo.masterCart - the master cart the bundle is inproduct - the product for which the cartentries should be foundbundleNo - the bundleNo for which the cartentries should be foundjava.util.List<CartEntryModel> getCartEntriesForComponentInBundle(CartModel masterCart, BundleTemplateModel component, int bundleNo)
CartEntryModel for component and bundleNo.masterCart - the master cart the bundle is incomponent - the component for which the cartentries should be foundbundleNo - the bundleNo for which the cartentries should be foundjava.util.List<CartEntryModel> getCartEntriesForBundle(CartModel masterCart, int bundleNo)
masterCart - the master cart the bundle is inbundleNo - the bundleNo for which the cartEntries should be foundCartEntryModel with specific bundle numberBillingTimeModel getMasterBillingTime()
BillingTimeModelBillingTimeModelBundleTemplateModel getFirstInvalidComponentInCart(CartModel masterCart)
masterCart if there are invalid components in it.masterCart - BundleTemplateModel if there is one, otherwise nullCopyright © 2018 SAP SE. All Rights Reserved.