Interface TmaCartFacade
- All Superinterfaces:
de.hybris.platform.commercefacades.order.CartFacade
- All Known Implementing Classes:
DefaultTmaCartFacade,DefaultTmaWebServicesCartFacade
public interface TmaCartFacade
extends de.hybris.platform.commercefacades.order.CartFacade
Facade handling cart operations for
TmaProductOffering.- Since:
- 6.7
-
Method Summary
Modifier and TypeMethodDescriptionaddBpoSelectedOfferings(String rootBpoCode, List<String> simpleProductOfferings, String processType, int cartGroupNo, String subscriptionTermId, String subscriberId, String subscriberBillingId) Deprecated, for removal: This API element is subject to removal in a future version.addProductOfferingToCart(String spoCode, long quantity, String processType, String rootBpoCode, int cartGroupNo, String subscriptionTermId, String subscriberId, String subscriberBillingId) Deprecated, for removal: This API element is subject to removal in a future version.since 1907, useprocessCartAction(List)insteadCreates a cart for the provided user if cart does not exist.getCartForCode(String code, boolean recalculate) Retrieve a cart using codegetCartForCodeAndCustomer(String code, String customerId) Get a cart using code andUserModelgetCartForCodeAndCustomer(String code, String customerId, boolean recalculate) Get a cart using code and customer idgetCartForGuid(String guid) Get a cart using guidRetrieve the list of all cartsgetCartsForCustomer(String customerId) Get the list of carts for a customergetCartsForCustomer(String customerId, boolean recalculate) Get the list of carts for a customerbooleanisAnonymousUserCart(String cartGuid) Checks if given card belongs to anonymous user.booleanisCurrentUserCart(String cartGuid) Checks if given card belongs to current user.booleanisValidCartStatus(String status) Checks if the requested status for cart is valid or notprocessCartAction(List<CartActionInput> cartActionInputList) Processes cart entry updates.voidvalidateAndUpdateCartActionInputForClone(CartActionInput cartActionInput) Validates and updates cart action inputs for clone operationMethods inherited from interface de.hybris.platform.commercefacades.order.CartFacade
addToCart, addToCart, addToCart, estimateExternalTaxes, getCartsForCurrentUser, getDeliveryCountries, getMiniCart, getMostRecentCartGuidForUser, getSessionCart, getSessionCartGuid, getSessionCartWithEntryOrdering, hasEntries, hasSessionCart, removeEntryGroup, removeSessionCart, removeStaleCarts, restoreAnonymousCartAndMerge, restoreAnonymousCartAndTakeOwnership, restoreCartAndMerge, restoreSavedCart, updateCartEntry, updateCartEntry, updateCartEntry, updateCartMetadata, validateCartData
-
Method Details
-
getCartForCodeAndCustomer
Get a cart using code andUserModel- Parameters:
code- The cart identifier codecustomerId- The id of the customer who owns the cart- Returns:
- cart
-
getCartForCodeAndCustomer
Optional<CartData> getCartForCodeAndCustomer(String code, String customerId, boolean recalculate) throws de.hybris.platform.order.exceptions.CalculationException Get a cart using code and customer id- Parameters:
code- The cart identifier codecustomerId- The id of the customer who owns the cartrecalculate- Flag which indicates if the cart should be recalculated or not- Returns:
- cart
- Throws:
de.hybris.platform.order.exceptions.CalculationException- If errors occurre during cart recalculation
-
getCartForCode
Optional<CartData> getCartForCode(String code, boolean recalculate) throws de.hybris.platform.order.exceptions.CalculationException Retrieve a cart using code- Parameters:
code- The cart identifier coderecalculate- Flag which indicates if the cart should be recalculated or not- Returns:
- cart
- Throws:
de.hybris.platform.order.exceptions.CalculationException- If errors occurred during cart recalculation
-
getCartsForCustomer
Get the list of carts for a customer- Parameters:
customerId- The id of the customer who owns the carts- Returns:
- the cart list
-
getCartsForCustomer
List<CartData> getCartsForCustomer(String customerId, boolean recalculate) throws de.hybris.platform.order.exceptions.CalculationException Get the list of carts for a customer- Parameters:
customerId- The id of the customer who owns the cartsrecalculate- Flag which indicates if the cart should be recalculated or not- Returns:
- the cart list
- Throws:
de.hybris.platform.order.exceptions.CalculationException- If errors occurre during cart recalculation
-
getCarts
List<CartData> getCarts(boolean recalculate, Integer offset, Integer limit) throws de.hybris.platform.order.exceptions.CalculationException Retrieve the list of all carts- Parameters:
recalculate- Flag which indicates if the carts should be recalculated or notoffset- the offset represents the position in list from where the result list will start.limit- the limit represents the number of entries that will be selected for the result list.- Returns:
- the cart list
- Throws:
de.hybris.platform.order.exceptions.CalculationException- If errors occurred during cart recalculation
-
processCartAction
List<CartModificationData> processCartAction(List<CartActionInput> cartActionInputList) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Processes cart entry updates.- Parameters:
cartActionInputList- contains attributes used for cart entry updates- Returns:
- list
CartModificationData - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- in case of any error occurs during cart entry update
-
createCartForUserAndCurrentBaseSite
Creates a cart for the provided user if cart does not exist. If cart exists returns the existing cart.- Parameters:
userId- The unique identifier of the user.- Returns:
- The cart which was created.
-
addProductOfferingToCart
@Deprecated(since="1907", forRemoval=true) CartModificationData addProductOfferingToCart(String spoCode, long quantity, String processType, String rootBpoCode, int cartGroupNo, String subscriptionTermId, String subscriberId, String subscriberBillingId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Deprecated, for removal: This API element is subject to removal in a future version.since 1907, useprocessCartAction(List)insteadAdds a new cart entry containing aTmaSimpleProductOfferingModelto the existing cart. The product offering can be added as a single offering, but also as part of aTmaBundledProductOfferingModel.- Parameters:
spoCode-ProductModel.CODEquantity- product offering quantity to be added to cartprocessType- represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)rootBpoCode- rootProductModel.CODEcartGroupNo- the cart entry group number on which the new entry to be attached to, if -1 a new entry group will be createdsubscriptionTermId- subscription term id for the entrysubscriberId- subscriber id in case of an existing customersubscriberBillingId- subscriber billing id in case of an existing customer- Returns:
- details related to the new cart entry
- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- in case of any error occurs during new cart entry addition
-
addBpoSelectedOfferings
@Deprecated(since="1907", forRemoval=true) List<CartModificationData> addBpoSelectedOfferings(String rootBpoCode, List<String> simpleProductOfferings, String processType, int cartGroupNo, String subscriptionTermId, String subscriberId, String subscriberBillingId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Deprecated, for removal: This API element is subject to removal in a future version.since 1907, useprocessCartAction(List)insteadAdds multiple cart entries containing aTmaSimpleProductOfferingModelto the existing cart, all of them being part of theTmaBundledProductOfferingModelspecified by the rootBpoCode. If the cartGroupNo is valid, then the new entries are added as part of the corresponding cart group, otherwise, if cartGroupNo is -1, a new cart group is created for the new added entries.- Parameters:
rootBpoCode-ProductModel.CODEof the bundled offering added to cartsimpleProductOfferings- a list containingProductModel.CODEprocessType- represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)cartGroupNo- existing cart entry group numbersubscriptionTermId- subscription term id for the entrysubscriberId- subscriber id in case of an existing customersubscriberBillingId- subscriber billing id in case of an existing customer- Returns:
- details regarding new added entries
- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- in case of any error occurs during new cart entries addition
-
getCartForGuid
Get a cart using guid- Parameters:
guid-- Returns:
- the specific cart for given guid
-
isAnonymousUserCart
Checks if given card belongs to anonymous user.- Parameters:
cartGuid- GUID of the cart.- Returns:
- true if the cart belongs to anonymous user.
-
isCurrentUserCart
Checks if given card belongs to current user.- Parameters:
cartGuid- GUID of the cart.- Returns:
- true if the cart belongs to current user.
-
validateAndUpdateCartActionInputForClone
void validateAndUpdateCartActionInputForClone(CartActionInput cartActionInput) throws de.hybris.platform.commerceservices.order.CommerceSaveCartException Validates and updates cart action inputs for clone operation- Parameters:
cartActionInput-- Throws:
de.hybris.platform.commerceservices.order.CommerceSaveCartException
-
isValidCartStatus
Checks if the requested status for cart is valid or not- Parameters:
status- the requested status to be updated for cart- Returns:
- True if requested status is valid status, otherwise false
-
processCartAction(List)instead