public class DefaultFlashbuyPromotionService extends java.lang.Object implements FlashbuyPromotionService
FlashbuyPromotionService| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOG |
| Constructor and Description |
|---|
DefaultFlashbuyPromotionService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allocate(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String promotionMatcher)
Move request from reserve and save the request to PromotionAllocation with productCode, promotionCode and
cartEntry
|
boolean |
enqueue(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String customerUID,
long quantity)
Save the enqueue request to PromotionEnqueue with productCode, promotionCode and customerID
|
protected FlashbuyPromotionDao |
getFlashbuyPromotionDao() |
protected ModelService |
getModelService() |
long |
getRemainingQuantity(java.lang.String promotionCode,
java.lang.String productCode)
Get the remaining quantity for the specific Product and Promotion
|
long |
getReserverdQuantity(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String promotionMatcher)
Get the reserved quantity for the specific cartEntry.
|
protected boolean |
hasEnqueuedBefore(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String customerUID) |
boolean |
reserve(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String customerUID,
java.lang.String promotionMatcher)
Move request from enqueue and save the request to PromotionReservation with productCode, promotionCode and
cartEntry
|
void |
setFlashbuyPromotionDao(FlashbuyPromotionDao flashbuyPromotionDao) |
void |
setModelService(ModelService modelService) |
public long getRemainingQuantity(java.lang.String promotionCode,
java.lang.String productCode)
FlashbuyPromotionServicegetRemainingQuantity in interface FlashbuyPromotionServicepromotionCode - Promotion CodeproductCode - Product Codepublic long getReserverdQuantity(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String promotionMatcher)
FlashbuyPromotionServicegetReserverdQuantity in interface FlashbuyPromotionServicepromotionCode - Promotion CodeproductCode - Product CodepromotionMatcher - Generated Id to match cart entry and order entrypublic boolean enqueue(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String customerUID,
long quantity)
throws MultipleEnqueueException
FlashbuyPromotionServiceenqueue in interface FlashbuyPromotionServicepromotionCode - Promotion CodeproductCode - Product CodecustomerUID - Customer Uidquantity - Request quantityMultipleEnqueueException - if not first time request to enqueuepublic boolean reserve(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String customerUID,
java.lang.String promotionMatcher)
FlashbuyPromotionServicereserve in interface FlashbuyPromotionServicepromotionCode - Promotion CodeproductCode - Product CodecustomerUID - Customer UidpromotionMatcher - Generated Id to match cart entry and order entrypublic boolean allocate(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String promotionMatcher)
FlashbuyPromotionServiceallocate in interface FlashbuyPromotionServicepromotionCode - Promotion CodeproductCode - Product CodepromotionMatcher - Generated Id to match cart entry and order entryprotected boolean hasEnqueuedBefore(java.lang.String promotionCode,
java.lang.String productCode,
java.lang.String customerUID)
protected FlashbuyPromotionDao getFlashbuyPromotionDao()
public void setFlashbuyPromotionDao(FlashbuyPromotionDao flashbuyPromotionDao)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.