Class DefaultCommerceCheckoutService
java.lang.Object
de.hybris.platform.commerceservices.order.impl.DefaultCommerceCheckoutService
- All Implemented Interfaces:
CommerceCheckoutService
- Direct Known Subclasses:
DefaultB2BCommerceCheckoutService
Default implementation of
CommerceCheckoutService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorizePayment(CommerceCheckoutParameter parameter) Authorizes the total amount of the cart ifCommerceCheckoutParameter.authorizationAmountis null otherwise the passed in amout is authorizedauthorizePayment(CartModel cartModel, String securityCode, String paymentProvider) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.authorizePayment(CartModel cartModel, String securityCode, String paymentProvider, BigDecimal amount) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.protected BigDecimalcalculateAuthAmount(CartModel cartModel) Calculate authorization amount.voidcalculateCart(CommerceCheckoutParameter parameter) Calculates the cartModel if the calculated flag is false.voidcalculateCart(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.protected BaseSiteServiceprotected BaseStoreServiceprotected CalculationServiceprotected CommerceCartCalculationStrategyprotected CommerceDeliveryAddressStrategyprotected CommerceDeliveryModeStrategyprotected CommerceDeliveryModeValidationStrategyprotected CommercePaymentAuthorizationStrategyprotected CommercePaymentInfoStrategyprotected CommercePaymentProviderStrategyprotected CommercePlaceOrderStrategyprotected CommonI18NServicegetCountries(CountryType countryType) Get countries.protected DeliveryServiceprotected I18NServiceprotected ModelServiceprotected OrderServiceGet the payment provider nameprotected PaymentServiceprotected PromotionsServiceplaceOrder(CommerceCheckoutParameter parameter) Creates an order for the given cartplaceOrder(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.placeOrder(CartModel cartModel, SalesApplication salesApplication) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleanremoveDeliveryMode(CommerceCheckoutParameter parameter) Removes delivery mode from cart.booleanremoveDeliveryMode(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.voidsetBaseSiteService(BaseSiteService siteService) voidsetBaseStoreService(BaseStoreService service) voidsetCalculationService(CalculationService calculationService) voidsetCommerceCartCalculationStrategy(CommerceCartCalculationStrategy commerceCartCalculationStrategy) voidsetCommerceDeliveryAddressStrategy(CommerceDeliveryAddressStrategy commerceDeliveryAddressStrategy) voidsetCommerceDeliveryModeStrategy(CommerceDeliveryModeStrategy commerceDeliveryModeStrategy) voidsetCommerceDeliveryModeValidationStrategy(CommerceDeliveryModeValidationStrategy commerceDeliveryModeValidationStrategy) voidsetCommercePaymentAuthorizationStrategy(CommercePaymentAuthorizationStrategy commercePaymentAuthorizationStrategy) voidsetCommercePaymentInfoStrategy(CommercePaymentInfoStrategy commercePaymentInfoStrategy) voidsetCommercePaymentProviderStrategy(CommercePaymentProviderStrategy commercePaymentProviderStrategy) voidsetCommercePlaceOrderStrategy(CommercePlaceOrderStrategy commercePlaceOrderStrategy) voidsetCommonI18NService(CommonI18NService commonI18NService) booleansetDeliveryAddress(CommerceCheckoutParameter parameter) Sets the given address as delivery address on the cart and also marks the address as delivery address.booleansetDeliveryAddress(CartModel cartModel, AddressModel addressModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleansetDeliveryAddress(CartModel cartModel, AddressModel addressModel, boolean flagAsDeliveryAddress) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleansetDeliveryMode(CommerceCheckoutParameter parameter) Sets the given delivery mode on the cartbooleansetDeliveryMode(CartModel cartModel, DeliveryModeModel deliveryModeModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.voidsetDeliveryService(DeliveryService deliveryService) voidsetExternalTaxesService(ExternalTaxesService externalTaxesService) voidsetI18nService(I18NService i18nService) voidsetModelService(ModelService modelService) voidsetOrderService(OrderService orderService) booleansetPaymentInfo(CommerceCheckoutParameter parameter) Sets the given payment info on the cartbooleansetPaymentInfo(CartModel cartModel, PaymentInfoModel paymentInfoModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.voidsetPaymentService(PaymentService paymentService) voidsetPromotionsService(PromotionsService promotionsService) voidvalidateDeliveryMode(CommerceCheckoutParameter parameter) Validates the current delivery mode on the cart and clears if not valid the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)voidvalidateDeliveryMode(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.
-
Constructor Details
-
DefaultCommerceCheckoutService
public DefaultCommerceCheckoutService()
-
-
Method Details
-
setDeliveryAddress
@Deprecated(since="5.2", forRemoval=true) public boolean setDeliveryAddress(CartModel cartModel, AddressModel addressModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
setDeliveryAddressin interfaceCommerceCheckoutService- Parameters:
cartModel- the cartaddressModel- the address, a null address will cause the delivery address to be removed from the cart.- Returns:
- true if successful
-
setDeliveryAddress
@Deprecated(since="5.2", forRemoval=true) public boolean setDeliveryAddress(CartModel cartModel, AddressModel addressModel, boolean flagAsDeliveryAddress) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
setDeliveryAddressin interfaceCommerceCheckoutService- Parameters:
cartModel- the cartaddressModel- the address a null address will cause the delivery address to be removed from the cart.flagAsDeliveryAddress- true to mark the given address as delivery address- Returns:
- true if successful
-
setDeliveryAddress
Description copied from interface:CommerceCheckoutServiceSets the given address as delivery address on the cart and also marks the address as delivery address. A null address will cause removal of deliveryAddress from the cart.- Specified by:
setDeliveryAddressin interfaceCommerceCheckoutService- Parameters:
parameter- A parameter object- Returns:
- true if successful
-
setDeliveryMode
Description copied from interface:CommerceCheckoutServiceSets the given delivery mode on the cart- Specified by:
setDeliveryModein interfaceCommerceCheckoutService- Parameters:
parameter- A parameter object for cart and deliverymode- Returns:
- true if successful
-
setDeliveryMode
@Deprecated(since="5.2", forRemoval=true) public boolean setDeliveryMode(CartModel cartModel, DeliveryModeModel deliveryModeModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
setDeliveryModein interfaceCommerceCheckoutService- Parameters:
cartModel- the cartdeliveryModeModel- the delivery mode- Returns:
- true if successful
-
removeDeliveryMode
Description copied from interface:CommerceCheckoutServiceRemoves delivery mode from cart. the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)- Specified by:
removeDeliveryModein interfaceCommerceCheckoutService- Parameters:
parameter- A parameter object holding the cart- Returns:
- true if success
-
removeDeliveryMode
Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
removeDeliveryModein interfaceCommerceCheckoutService- Parameters:
cartModel- the cart- Returns:
- true if the deliver mode is removed
-
calculateCart
Description copied from interface:CommerceCheckoutServiceCalculates the cartModel if the calculated flag is false.- Specified by:
calculateCartin interfaceCommerceCheckoutService- Parameters:
parameter- The parameter object for the current user's cartModel
-
calculateCart
Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
calculateCartin interfaceCommerceCheckoutService- Parameters:
cartModel- The current user's cartModel
-
validateDeliveryMode
Description copied from interface:CommerceCheckoutServiceValidates the current delivery mode on the cart and clears if not valid the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)- Specified by:
validateDeliveryModein interfaceCommerceCheckoutService- Parameters:
parameter- The parameter object holding the cart
-
validateDeliveryMode
Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
validateDeliveryModein interfaceCommerceCheckoutService- Parameters:
cartModel- the cart
-
setPaymentInfo
Description copied from interface:CommerceCheckoutServiceSets the given payment info on the cart- Specified by:
setPaymentInfoin interfaceCommerceCheckoutService- Parameters:
parameter- A parameter object for cart and payment details- Returns:
- true if successful
-
setPaymentInfo
@Deprecated(since="5.2", forRemoval=true) public boolean setPaymentInfo(CartModel cartModel, PaymentInfoModel paymentInfoModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
setPaymentInfoin interfaceCommerceCheckoutService- Parameters:
cartModel- the cartpaymentInfoModel- the payment details- Returns:
- true if successful
-
authorizePayment
Description copied from interface:CommerceCheckoutServiceAuthorizes the total amount of the cart ifCommerceCheckoutParameter.authorizationAmountis null otherwise the passed in amout is authorized- Specified by:
authorizePaymentin interfaceCommerceCheckoutService- Parameters:
parameter- A parameter object holding the cart, security code, payment provider and optionaly authorization amount.- Returns:
- A payment transaction entry.
-
calculateAuthAmount
Calculate authorization amount.- Parameters:
cartModel- the cart model- Returns:
- the big decimal authorization amount
-
authorizePayment
@Deprecated(since="5.2", forRemoval=true) public PaymentTransactionEntryModel authorizePayment(CartModel cartModel, String securityCode, String paymentProvider) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
authorizePaymentin interfaceCommerceCheckoutService- Parameters:
cartModel- the cartsecurityCode- the cv2 numberpaymentProvider- the payment provider that will be used to authorize- Returns:
- the payment transaction entry
-
authorizePayment
@Deprecated(since="5.2", forRemoval=true) public PaymentTransactionEntryModel authorizePayment(CartModel cartModel, String securityCode, String paymentProvider, BigDecimal amount) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
authorizePaymentin interfaceCommerceCheckoutService- Parameters:
cartModel- the cartsecurityCode- the cv2 numberpaymentProvider- the payment provider that will be used to authorizeamount- the amount to authorize- Returns:
- the payment transaction entry
-
placeOrder
@Deprecated(since="5.2", forRemoval=true) public OrderModel placeOrder(CartModel cartModel, SalesApplication salesApplication) throws InvalidCartException Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
placeOrderin interfaceCommerceCheckoutService- Parameters:
cartModel- the cartsalesApplication- the sales application that placed the order- Returns:
- the order that has been created
- Throws:
InvalidCartException- if the order cannot be placed
-
placeOrder
@Deprecated(since="5.2", forRemoval=true) public OrderModel placeOrder(CartModel cartModel) throws InvalidCartException Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.- Specified by:
placeOrderin interfaceCommerceCheckoutService- Parameters:
cartModel- the cart- Returns:
- the order that has been created
- Throws:
InvalidCartException- if the order cannot be placed
-
placeOrder
public CommerceOrderResult placeOrder(CommerceCheckoutParameter parameter) throws InvalidCartException Description copied from interface:CommerceCheckoutServiceCreates an order for the given cart- Specified by:
placeOrderin interfaceCommerceCheckoutService- Returns:
- the order that has been created
- Throws:
InvalidCartException- if the order cannot be placed
-
getPaymentProvider
Description copied from interface:CommerceCheckoutServiceGet the payment provider name- Specified by:
getPaymentProviderin interfaceCommerceCheckoutService- Returns:
- the payment provider
-
getCountries
Description copied from interface:CommerceCheckoutServiceGet countries.- Specified by:
getCountriesin interfaceCommerceCheckoutService- Parameters:
countryType- If the value of type equals to shipping, then return shipping countries. If the value of type equals to billing, then return billing countries. If the value of type is not given, return all countries.- Returns:
- list of countries.
-
getModelService
-
setModelService
-
getDeliveryService
-
setDeliveryService
-
getI18nService
-
setI18nService
-
getCommonI18NService
-
setCommonI18NService
-
getPaymentService
-
setPaymentService
-
getOrderService
-
setOrderService
-
getBaseSiteService
-
setBaseSiteService
-
getBaseStoreService
-
setBaseStoreService
-
getPromotionsService
-
setPromotionsService
-
getCalculationService
-
setCalculationService
-
getExternalTaxesService
-
setExternalTaxesService
-
getCommerceCartCalculationStrategy
-
setCommerceCartCalculationStrategy
public void setCommerceCartCalculationStrategy(CommerceCartCalculationStrategy commerceCartCalculationStrategy) -
getCommercePlaceOrderStrategy
-
setCommercePlaceOrderStrategy
-
getCommercePaymentAuthorizationStrategy
-
setCommercePaymentAuthorizationStrategy
public void setCommercePaymentAuthorizationStrategy(CommercePaymentAuthorizationStrategy commercePaymentAuthorizationStrategy) -
getCommercePaymentInfoStrategy
-
setCommercePaymentInfoStrategy
-
getCommerceDeliveryModeValidationStrategy
-
setCommerceDeliveryModeValidationStrategy
public void setCommerceDeliveryModeValidationStrategy(CommerceDeliveryModeValidationStrategy commerceDeliveryModeValidationStrategy) -
getCommercePaymentProviderStrategy
-
setCommercePaymentProviderStrategy
public void setCommercePaymentProviderStrategy(CommercePaymentProviderStrategy commercePaymentProviderStrategy) -
getCommerceDeliveryAddressStrategy
-
setCommerceDeliveryAddressStrategy
public void setCommerceDeliveryAddressStrategy(CommerceDeliveryAddressStrategy commerceDeliveryAddressStrategy) -
getCommerceDeliveryModeStrategy
-
setCommerceDeliveryModeStrategy
public void setCommerceDeliveryModeStrategy(CommerceDeliveryModeStrategy commerceDeliveryModeStrategy)
-