Class DefaultFlashBuyService
java.lang.Object
de.hybris.platform.timedaccesspromotionengineservices.impl.DefaultFlashBuyService
- All Implemented Interfaces:
FlashBuyService
Default implementation of
FlashBuyService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate or update cronjob for flash buy coupon to reset max order quantityprotected FlashBuyCronJobModelcreateFlashBuyCronJob(FlashBuyCouponModel coupon, ServicelayerJobModel job) protected voidcreateResetMaxQtyJobTrigger(FlashBuyCouponModel coupon, FlashBuyCronJobModel cronJob) protected voidcreateSetMaxQtyJobTrigger(FlashBuyCouponModel coupon, FlashBuyCronJobModel cronJob) voidDeletes cronjobs for setting and resetting max order quantity and triggered by flash buy couponGets all products by promotionsourceruleprotected CronJobDaoprotected CronJobServicegetFlashBuyCouponByProduct(ProductModel product) Gets flash buy coupon by productGets flash buy coupon by promotion source ruleprotected FlashBuyDaoprotected ServicelayerJobModelgetFlashBuyJob(String jobCode) protected JobDaoprotected ModelServiceprotected <T extends DroolsRuleModel>
StringgetModuleName(T rule) protected ProductDaogetProductForCode(String productCode) Finds Product by product codegetProductForPromotion(AbstractPromotionModel promotion) Gets product by promotionGets productforpromotionsourcerule by promotionsourcerulegetPromotionByCode(String promotionCode) Finds Promotion by given promotion codeprotected PromotionDaogetPromotionSourceRulesByProductCode(String productCode) Gets promotion source rules by productprotected RuleMaintenanceServicevoidPerforms cronjob for flash buy directlyvoidsetCronJobDao(CronJobDao cronJobDao) voidsetCronJobService(CronJobService cronJobService) voidsetFlashBuyDao(FlashBuyDao flashBuyDao) voidvoidsetModelService(ModelService modelService) voidsetProductDao(ProductDao productDao) voidsetPromotionDao(PromotionDao promotionDao) voidsetRuleMaintenanceService(RuleMaintenanceService ruleMaintenanceService) voidundeployFlashBuyPromotion(PromotionSourceRuleModel promotionSourceRule) Stops flash buy promotion by promotion
-
Constructor Details
-
DefaultFlashBuyService
public DefaultFlashBuyService()
-
-
Method Details
-
getProductForPromotion
Description copied from interface:FlashBuyServiceGets product by promotion- Specified by:
getProductForPromotionin interfaceFlashBuyService- Parameters:
promotion- the given promotion- Returns:
- Optional
Optional of ProductModel
-
getPromotionByCode
Description copied from interface:FlashBuyServiceFinds Promotion by given promotion code- Specified by:
getPromotionByCodein interfaceFlashBuyService- Parameters:
promotionCode- the given promotion code- Returns:
- AbstractPromotion Model
-
getFlashBuyCouponByPromotionCode
Description copied from interface:FlashBuyServiceGets flash buy coupon by promotion source rule- Specified by:
getFlashBuyCouponByPromotionCodein interfaceFlashBuyService- Parameters:
code- the promotion code- Returns:
- Optional
Optional of FlashBuyCouponModel
-
getPromotionSourceRulesByProductCode
Description copied from interface:FlashBuyServiceGets promotion source rules by product- Specified by:
getPromotionSourceRulesByProductCodein interfaceFlashBuyService- Parameters:
productCode- the product code- Returns:
- list of PromotionSourceRuleModel
-
undeployFlashBuyPromotion
Description copied from interface:FlashBuyServiceStops flash buy promotion by promotion- Specified by:
undeployFlashBuyPromotionin interfaceFlashBuyService- Parameters:
promotionSourceRule- the promotionSourceRule model
-
createCronJobForFlashBuyCoupon
Description copied from interface:FlashBuyServiceCreate or update cronjob for flash buy coupon to reset max order quantity- Specified by:
createCronJobForFlashBuyCouponin interfaceFlashBuyService- Parameters:
coupon- the flash buy coupon model
-
performFlashBuyCronJob
Description copied from interface:FlashBuyServicePerforms cronjob for flash buy directly- Specified by:
performFlashBuyCronJobin interfaceFlashBuyService- Parameters:
coupon- the flash buy coupon model
-
deleteCronJobAndTrigger
Description copied from interface:FlashBuyServiceDeletes cronjobs for setting and resetting max order quantity and triggered by flash buy coupon- Specified by:
deleteCronJobAndTriggerin interfaceFlashBuyService- Parameters:
coupon- the flash buy coupon model
-
createSetMaxQtyJobTrigger
-
createResetMaxQtyJobTrigger
protected void createResetMaxQtyJobTrigger(FlashBuyCouponModel coupon, FlashBuyCronJobModel cronJob) -
createFlashBuyCronJob
protected FlashBuyCronJobModel createFlashBuyCronJob(FlashBuyCouponModel coupon, ServicelayerJobModel job) -
getProductForPromotionSourceRule
public List<ProductForPromotionSourceRuleModel> getProductForPromotionSourceRule(PromotionSourceRuleModel sourceRule) Description copied from interface:FlashBuyServiceGets productforpromotionsourcerule by promotionsourcerule- Specified by:
getProductForPromotionSourceRulein interfaceFlashBuyService- Parameters:
sourceRule- the promotion source rule- Returns:
- List of ProductForPromotionSourceRuleModel
-
getAllProductsByPromotionSourceRule
Description copied from interface:FlashBuyServiceGets all products by promotionsourcerule- Specified by:
getAllProductsByPromotionSourceRulein interfaceFlashBuyService- Parameters:
rule- the promotion source rule- Returns:
- List
list of ProductModel
-
getFlashBuyCouponByProduct
Description copied from interface:FlashBuyServiceGets flash buy coupon by product- Specified by:
getFlashBuyCouponByProductin interfaceFlashBuyService- Parameters:
product- the product model- Returns:
- List
list of FlashBuysCouponModel
-
getFlashBuyJob
-
getProductForCode
Description copied from interface:FlashBuyServiceFinds Product by product code- Specified by:
getProductForCodein interfaceFlashBuyService- Parameters:
productCode- the given productCode- Returns:
- List
list of ProductModel
-
getModuleName
-
getRuleMaintenanceService
-
setRuleMaintenanceService
-
getFlashBuyDao
-
setFlashBuyDao
-
getPromotionDao
-
setPromotionDao
-
getJobDao
-
setJobDao
-
getCronJobDao
-
setCronJobDao
-
getCronJobService
-
setCronJobService
-
getModelService
-
setModelService
-
getProductDao
-
setProductDao
-