Interface FlashBuyService

  • All Known Implementing Classes:
    DefaultFlashBuyService

    public interface FlashBuyService
    Deals with flash buy related models using existing DAOs
    • Method Detail

      • getProductForPromotion

        java.util.Optional<ProductModel> getProductForPromotion​(AbstractPromotionModel promotion)
        Gets product by promotion
        Parameters:
        promotion - the given promotion
        Returns:
        Optional Optional of ProductModel
      • getPromotionSourceRulesByProductCode

        java.util.List<PromotionSourceRuleModel> getPromotionSourceRulesByProductCode​(java.lang.String productCode)
        Gets promotion source rules by product
        Parameters:
        productCode - the product code
        Returns:
        list of PromotionSourceRuleModel
      • getFlashBuyCouponByPromotionCode

        java.util.Optional<FlashBuyCouponModel> getFlashBuyCouponByPromotionCode​(java.lang.String code)
        Gets flash buy coupon by promotion source rule
        Parameters:
        code - the promotion code
        Returns:
        Optional Optional of FlashBuyCouponModel
      • undeployFlashBuyPromotion

        void undeployFlashBuyPromotion​(PromotionSourceRuleModel promotionSourceRule)
        Stops flash buy promotion by promotion
        Parameters:
        promotionSourceRule - the promotionSourceRule model
      • getPromotionByCode

        AbstractPromotionModel getPromotionByCode​(java.lang.String promotionCode)
        Finds Promotion by given promotion code
        Parameters:
        promotionCode - the given promotion code
        Returns:
        AbstractPromotion Model
      • createCronJobForFlashBuyCoupon

        void createCronJobForFlashBuyCoupon​(FlashBuyCouponModel coupon)
        Create or update cronjob for flash buy coupon to reset max order quantity
        Parameters:
        coupon - the flash buy coupon model
      • performFlashBuyCronJob

        void performFlashBuyCronJob​(FlashBuyCouponModel coupon)
        Performs cronjob for flash buy directly
        Parameters:
        coupon - the flash buy coupon model
      • getProductForPromotionSourceRule

        java.util.List<ProductForPromotionSourceRuleModel> getProductForPromotionSourceRule​(PromotionSourceRuleModel promotionSourceRule)
        Gets productforpromotionsourcerule by promotionsourcerule
        Parameters:
        promotionSourceRule - the promotion source rule
        Returns:
        List of ProductForPromotionSourceRuleModel
      • getProductForCode

        java.util.List<ProductModel> getProductForCode​(java.lang.String productCode)
        Finds Product by product code
        Parameters:
        productCode - the given productCode
        Returns:
        List list of ProductModel
      • getAllProductsByPromotionSourceRule

        java.util.List<ProductModel> getAllProductsByPromotionSourceRule​(PromotionSourceRuleModel rule)
        Gets all products by promotionsourcerule
        Parameters:
        rule - the promotion source rule
        Returns:
        List list of ProductModel
      • getFlashBuyCouponByProduct

        java.util.List<FlashBuyCouponModel> getFlashBuyCouponByProduct​(ProductModel product)
        Gets flash buy coupon by product
        Parameters:
        product - the product model
        Returns:
        List list of FlashBuysCouponModel
      • deleteCronJobAndTrigger

        void deleteCronJobAndTrigger​(FlashBuyCouponModel coupon)
        Deletes cronjobs for setting and resetting max order quantity and triggered by flash buy coupon
        Parameters:
        coupon - the flash buy coupon model