public class DefaultChineseCheckoutService extends java.lang.Object implements ChineseCheckoutService
ChineseCheckoutService. Delivers main functionality for chinese checkout service.| Constructor and Description |
|---|
DefaultChineseCheckoutService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
authorizePayment(java.lang.String securityCode,
CartModel cartModel)
Check whether the payment is authorized
|
protected boolean |
checkIfCurrentUserIsTheCartUser(CartModel cartModel) |
void |
deleteStockLevelReservationHistoryEntry(java.lang.String orderCode)
Delete the StockLevelReservationHistoryEntry after the user pay the order successfully
|
protected BaseStoreService |
getBaseStoreService() |
protected CheckoutCustomerStrategy |
getCheckoutCustomerStrategy() |
protected ChineseOrderDao |
getChineseOrderDao() |
protected ChineseStockLevelReservationHistoryEntryService |
getChineseStockLevelReservationHistoryEntryService() |
protected CustomerModel |
getCurrentUserForCheckout() |
protected DefaultWarehouseSelectionStrategy |
getDefaultWarehouseSelectionStrategy() |
protected ModelService |
getModelService() |
OrderModel |
getOrderByCode(java.lang.String code)
Getting the OrderModel by code
|
protected ProductService |
getProductService() |
protected StockService |
getStockService() |
java.util.Optional<TaskModel> |
getSubmitOrderEventTask(java.lang.String orderCode)
Gets task model by order code
|
void |
releaseStock(java.lang.String orderCode)
Release Stock after cancel order
|
boolean |
reserveStock(java.lang.String orderCode,
java.lang.String productCode,
int quantity,
java.util.Optional<PointOfServiceModel> pos)
Reserve the stock after place order
|
void |
setBaseStoreService(BaseStoreService baseStoreService) |
void |
setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy) |
void |
setChineseOrderDao(ChineseOrderDao chineseOrderDao) |
void |
setChineseStockLevelReservationHistoryEntryService(ChineseStockLevelReservationHistoryEntryService chineseStockLevelReservationHistoryEntryService) |
void |
setDefaultWarehouseSelectionStrategy(DefaultWarehouseSelectionStrategy defaultWarehouseSelectionStrategy) |
void |
setModelService(ModelService modelService) |
void |
setPaymentMode(PaymentModeModel paymentMode,
CartModel cartModel)
Save the PaymentMode information in the cart
|
void |
setProductService(ProductService productService) |
void |
setStockService(StockService stockService) |
public boolean reserveStock(java.lang.String orderCode,
java.lang.String productCode,
int quantity,
java.util.Optional<PointOfServiceModel> pos)
throws InsufficientStockLevelException
ChineseCheckoutServicereserveStock in interface ChineseCheckoutServiceorderCode - The code of the orderproductCode - The code of the product in the orderquantity - The quantity to be reservedpos - The point of service to find stockInsufficientStockLevelException - when stock level is insufficientpublic void releaseStock(java.lang.String orderCode)
ChineseCheckoutServicereleaseStock in interface ChineseCheckoutServiceorderCode - The code of the orderpublic void deleteStockLevelReservationHistoryEntry(java.lang.String orderCode)
ChineseCheckoutServicedeleteStockLevelReservationHistoryEntry in interface ChineseCheckoutServiceorderCode - The code of the orderpublic java.util.Optional<TaskModel> getSubmitOrderEventTask(java.lang.String orderCode)
ChineseCheckoutServicegetSubmitOrderEventTask in interface ChineseCheckoutServiceorderCode - the order codepublic boolean authorizePayment(java.lang.String securityCode,
CartModel cartModel)
ChineseCheckoutServiceauthorizePayment in interface ChineseCheckoutServicesecurityCode - The security codecartModel - The current cartprotected boolean checkIfCurrentUserIsTheCartUser(CartModel cartModel)
protected CustomerModel getCurrentUserForCheckout()
public void setPaymentMode(PaymentModeModel paymentMode, CartModel cartModel)
ChineseCheckoutServicesetPaymentMode in interface ChineseCheckoutServicepaymentMode - The selected PaymentModecartModel - The current cartpublic OrderModel getOrderByCode(java.lang.String code)
ChineseCheckoutServicegetOrderByCode in interface ChineseCheckoutServicecode - The code of the orderprotected StockService getStockService()
public void setStockService(StockService stockService)
protected ProductService getProductService()
public void setProductService(ProductService productService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected BaseStoreService getBaseStoreService()
public void setBaseStoreService(BaseStoreService baseStoreService)
protected DefaultWarehouseSelectionStrategy getDefaultWarehouseSelectionStrategy()
public void setDefaultWarehouseSelectionStrategy(DefaultWarehouseSelectionStrategy defaultWarehouseSelectionStrategy)
protected CheckoutCustomerStrategy getCheckoutCustomerStrategy()
public void setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy)
protected ChineseStockLevelReservationHistoryEntryService getChineseStockLevelReservationHistoryEntryService()
public void setChineseStockLevelReservationHistoryEntryService(ChineseStockLevelReservationHistoryEntryService chineseStockLevelReservationHistoryEntryService)
protected ChineseOrderDao getChineseOrderDao()
public void setChineseOrderDao(ChineseOrderDao chineseOrderDao)
Copyright © 2018 SAP SE. All Rights Reserved.