Class DefaultChineseCheckoutService

    • Constructor Detail

      • DefaultChineseCheckoutService

        public DefaultChineseCheckoutService()
    • 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 InsufficientStockLevelException
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1905
        Description copied from interface: ChineseCheckoutService
        Reserve the stock after place order
        Specified by:
        reserveStock in interface ChineseCheckoutService
        Parameters:
        orderCode - The code of the order
        productCode - The code of the product in the order
        quantity - The quantity to be reserved
        pos - 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 1905
        Description copied from interface: ChineseCheckoutService
        Release Stock after cancel order
        Specified by:
        releaseStock in interface ChineseCheckoutService
        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 1905
        Description copied from interface: ChineseCheckoutService
        Delete the StockLevelReservationHistoryEntry after the user pay the order successfully
        Specified by:
        deleteStockLevelReservationHistoryEntry in interface ChineseCheckoutService
        Parameters:
        orderCode - The code of the order
      • authorizePayment

        public boolean authorizePayment​(java.lang.String securityCode,
                                        CartModel cartModel)
        Description copied from interface: ChineseCheckoutService
        Check whether the payment is authorized
        Specified by:
        authorizePayment in interface ChineseCheckoutService
        Parameters:
        securityCode - The security code
        cartModel - 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()
      • 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
      • setProductService

        public void setProductService​(ProductService productService)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • setBaseStoreService

        public void setBaseStoreService​(BaseStoreService baseStoreService)
      • setCheckoutCustomerStrategy

        public void setCheckoutCustomerStrategy​(CheckoutCustomerStrategy checkoutCustomerStrategy)
      • setChineseOrderDao

        public void setChineseOrderDao​(ChineseOrderDao chineseOrderDao)