Class DefaultChineseCheckoutService
- java.lang.Object
-
- de.hybris.platform.chinesepaymentservices.checkout.impl.DefaultChineseCheckoutService
-
- All Implemented Interfaces:
ChineseCheckoutService
public class DefaultChineseCheckoutService extends java.lang.Object implements ChineseCheckoutService
Implementation forChineseCheckoutService. Delivers main functionality for chinese checkout service.
-
-
Constructor Summary
Constructors Constructor Description DefaultChineseCheckoutService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanauthorizePayment(java.lang.String securityCode, CartModel cartModel)Check whether the payment is authorizedprotected booleancheckIfCurrentUserIsTheCartUser(CartModel cartModel)voiddeleteStockLevelReservationHistoryEntry(java.lang.String orderCode)Deprecated, for removal: This API element is subject to removal in a future version.since 1905protected BaseStoreServicegetBaseStoreService()protected CheckoutCustomerStrategygetCheckoutCustomerStrategy()protected ChineseOrderDaogetChineseOrderDao()protected ChineseStockLevelReservationHistoryEntryServicegetChineseStockLevelReservationHistoryEntryService()protected CustomerModelgetCurrentUserForCheckout()protected DefaultWarehouseSelectionStrategygetDefaultWarehouseSelectionStrategy()protected ModelServicegetModelService()OrderModelgetOrderByCode(java.lang.String code)Getting the OrderModel by codeprotected ProductServicegetProductService()protected StockServicegetStockService()Deprecated, for removal: This API element is subject to removal in a future version.since 1905java.util.Optional<TaskModel>getSubmitOrderEventTask(java.lang.String orderCode)Gets task model by order codevoidreleaseStock(java.lang.String orderCode)Deprecated, for removal: This API element is subject to removal in a future version.since 1905booleanreserveStock(java.lang.String orderCode, java.lang.String productCode, int quantity, java.util.Optional<PointOfServiceModel> pos)Deprecated, for removal: This API element is subject to removal in a future version.since 1905voidsetBaseStoreService(BaseStoreService baseStoreService)voidsetCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy)voidsetChineseOrderDao(ChineseOrderDao chineseOrderDao)voidsetChineseStockLevelReservationHistoryEntryService(ChineseStockLevelReservationHistoryEntryService chineseStockLevelReservationHistoryEntryService)voidsetDefaultWarehouseSelectionStrategy(DefaultWarehouseSelectionStrategy defaultWarehouseSelectionStrategy)voidsetModelService(ModelService modelService)voidsetPaymentMode(PaymentModeModel paymentMode, CartModel cartModel)Save the PaymentMode information in the cartvoidsetProductService(ProductService productService)voidsetStockService(StockService stockService)Deprecated, for removal: This API element is subject to removal in a future version.since 1905
-
-
-
Method Detail
-
reserveStock
@Deprecated(since="1905", forRemoval=true) public boolean reserveStock(java.lang.String orderCode, java.lang.String productCode, int quantity, java.util.Optional<PointOfServiceModel> pos) throws InsufficientStockLevelExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905Description copied from interface:ChineseCheckoutServiceReserve the stock after place order- Specified by:
reserveStockin interfaceChineseCheckoutService- Parameters:
orderCode- The code of the orderproductCode- The code of the product in the orderquantity- The quantity to be reservedpos- The point of service to find stock- Returns:
- If reserve stock successfully
- Throws:
InsufficientStockLevelException- when stock level is insufficient
-
releaseStock
@Deprecated(since="1905", forRemoval=true) public void releaseStock(java.lang.String orderCode)Deprecated, for removal: This API element is subject to removal in a future version.since 1905Description copied from interface:ChineseCheckoutServiceRelease Stock after cancel order- Specified by:
releaseStockin interfaceChineseCheckoutService- Parameters:
orderCode- The code of the order
-
deleteStockLevelReservationHistoryEntry
@Deprecated(since="1905", forRemoval=true) public void deleteStockLevelReservationHistoryEntry(java.lang.String orderCode)Deprecated, for removal: This API element is subject to removal in a future version.since 1905Description copied from interface:ChineseCheckoutServiceDelete the StockLevelReservationHistoryEntry after the user pay the order successfully- Specified by:
deleteStockLevelReservationHistoryEntryin interfaceChineseCheckoutService- Parameters:
orderCode- The code of the order
-
getSubmitOrderEventTask
public java.util.Optional<TaskModel> getSubmitOrderEventTask(java.lang.String orderCode)
Description copied from interface:ChineseCheckoutServiceGets task model by order code- Specified by:
getSubmitOrderEventTaskin interfaceChineseCheckoutService- Parameters:
orderCode- the order code- Returns:
- the optional of task model
-
authorizePayment
public boolean authorizePayment(java.lang.String securityCode, CartModel cartModel)Description copied from interface:ChineseCheckoutServiceCheck whether the payment is authorized- Specified by:
authorizePaymentin interfaceChineseCheckoutService- Parameters:
securityCode- The security codecartModel- The current cart- Returns:
- true if the owner of the cart is current use, false otherwise
-
checkIfCurrentUserIsTheCartUser
protected boolean checkIfCurrentUserIsTheCartUser(CartModel cartModel)
-
getCurrentUserForCheckout
protected CustomerModel getCurrentUserForCheckout()
-
setPaymentMode
public void setPaymentMode(PaymentModeModel paymentMode, CartModel cartModel)
Description copied from interface:ChineseCheckoutServiceSave the PaymentMode information in the cart- Specified by:
setPaymentModein interfaceChineseCheckoutService- Parameters:
paymentMode- The selected PaymentModecartModel- The current cart
-
getOrderByCode
public OrderModel getOrderByCode(java.lang.String code)
Description copied from interface:ChineseCheckoutServiceGetting the OrderModel by code- Specified by:
getOrderByCodein interfaceChineseCheckoutService- Parameters:
code- The code of the order- Returns:
- order model
-
getStockService
@Deprecated(since="1905", forRemoval=true) protected StockService getStockService()Deprecated, for removal: This API element is subject to removal in a future version.since 1905
-
setStockService
@Deprecated(since="1905", forRemoval=true) public void setStockService(StockService stockService)Deprecated, for removal: This API element is subject to removal in a future version.since 1905
-
getProductService
protected ProductService getProductService()
-
setProductService
public void setProductService(ProductService productService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getBaseStoreService
protected BaseStoreService getBaseStoreService()
-
setBaseStoreService
public void setBaseStoreService(BaseStoreService baseStoreService)
-
getDefaultWarehouseSelectionStrategy
protected DefaultWarehouseSelectionStrategy getDefaultWarehouseSelectionStrategy()
-
setDefaultWarehouseSelectionStrategy
public void setDefaultWarehouseSelectionStrategy(DefaultWarehouseSelectionStrategy defaultWarehouseSelectionStrategy)
-
getCheckoutCustomerStrategy
protected CheckoutCustomerStrategy getCheckoutCustomerStrategy()
-
setCheckoutCustomerStrategy
public void setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy)
-
getChineseStockLevelReservationHistoryEntryService
protected ChineseStockLevelReservationHistoryEntryService getChineseStockLevelReservationHistoryEntryService()
-
setChineseStockLevelReservationHistoryEntryService
public void setChineseStockLevelReservationHistoryEntryService(ChineseStockLevelReservationHistoryEntryService chineseStockLevelReservationHistoryEntryService)
-
getChineseOrderDao
protected ChineseOrderDao getChineseOrderDao()
-
setChineseOrderDao
public void setChineseOrderDao(ChineseOrderDao chineseOrderDao)
-
-