Package com.skava.promotion.ecomm.action
Class ProductPersonalizationOffer
java.lang.Object
com.skava.promotion.action.BasePromotionAction
com.skava.promotion.ecomm.action.EcommBasePromotionAction
com.skava.promotion.ecomm.action.AbstractProductOfferAction
com.skava.promotion.ecomm.action.ProductPersonalizationOffer
- All Implemented Interfaces:
PromotionAction
This class contains the functionalities for Product personalization offer type
.- Since:
- 8.0
- Version:
- 8.0
- Author:
- Infosys Equinox
-
Field Summary
FieldsFields inherited from class com.skava.promotion.ecomm.action.AbstractProductOfferAction
filteredObjects, OFFER_SKU_KEY
Fields inherited from class com.skava.promotion.ecomm.action.EcommBasePromotionAction
DEAL_ITEM_CONSUMABLE, DISCOUNT_TYPE_EACH, DISCOUNT_TYPE_FLAT, DISCOUNT_TYPE_PARAM, DISCOUNT_TYPE_VALUE, OFFER_EXPENSIVE_TYPE_LEAST, OFFER_EXPENSIVE_TYPE_MOST, offerAbleBundle, offerAbleSku
Fields inherited from class com.skava.promotion.action.BasePromotionAction
ADDITIONAL_OFFER_INFO, ALLOW_NEGATIVE_VALUE, CURRENCY_OFFER, FIXED_OFFER, FORMULA, MAX_DISCOUNT_AMOUNT, MIN_DISCOUNT_AMOUNT, OFFER_VALUE, PERCENTAGE_OFFER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyOffer
(PromotionOfferDO promotionOfferDO, PromotionDO promotion) This method provides functionality to apply offerprotected void
getOffer
(PromotionOfferDO promotionOfferDO, PromotionDO promotion, PromotionSku sku) This method provides functionality to get offerprotected double
Functionalities to calculate total unitPrice/ShippingCost for current batchprotected void
getTotalPriceForCurrentBatch
(Map<String, Object> priceFacets) Functionalities to calculate total unitPrice/ShippingCost for current batchprotected double
Functionalities to calculate total unitPrice/ShippingCost per batchprotected void
getTotalPricePerBatch
(List<PromotionSku> skus, Map<String, Object> priceFacets) Functionalities to calculate total unitPrice/ShippingCost per batchprotected static double
getUpdatedPersonalizationPrice
(int quantityIndex, double price, List<PromotionOffer> offers, String type) This method provides functionality to get the updated personalization priceMethods inherited from class com.skava.promotion.ecomm.action.AbstractProductOfferAction
applyAction, getExpensiveType, prepareApplyAction, processOffer, removefilteredObjects
Methods inherited from class com.skava.promotion.ecomm.action.EcommBasePromotionAction
bundleClone, bundleProductClone, calculatAndGetUpdatedPriceFacetsValue, calculatAndGetUpdatedPriceFacetsValue, calculatAndGetUpdatedPriceFacetsValue, calculatAndGetUpdatedPriceFacetsValue, calculatAndGetUpdatedPriceFacetValue, calculateBundleOffer, calculateBundleOffer, calculateDiscount, calculateOffer, calculateOffer, calculatePriceFacetsOffer, calculatePriceFacetsOfferForBundleProduct, calculateTotalBundlePriceFacets, calculateTotalBundlePriceFacetsQtyFractional, calculateTotalPrice, calculateTotalPriceBundle, calculateTotalPriceBundleQtyFractional, calculateTotalPriceFacets, calculateTotalPriceFacetsQtyFractional, calculateTotalPriceQtyFractional, calibrateDiscount, calibrateDiscount2, checkForBestOffer, clone, findBestBundlePriceOffer, findBestProductPriceOffer, getBaseOffers, getBundleTotalQuantity, getBundleTotalQuantityFractional, getDiscountType, getEachDiscountQtyVal, getEcommOffer, getFlatDiscount, getTotalQuantity, getTotalQuantity, getTotalQuantityFractional, getTotalQuantityFractional, getUpdatedPrice, getUpdatedPriceFacetsValue, getUpdatedShippingCost, promotionSkuClone, removeCompletedBatchBundles, removeCompletedBatchBundles, removeCompletedBatchBundles, removeCompletedBatchBundles, removeCompletedBatchSkus, removeCompletedBatchSkus, setGiftQuantity, setGiftQuantity, setMatchedSkuId, setOffer, setOfferAbleBundles, setOfferAbleSkus, setOfferAbleSkus, sort, sortBundle, updateQuantiyBasedDiscount, updateUnitQuantiyBasedDiscount
Methods inherited from class com.skava.promotion.action.BasePromotionAction
createOffer, getAdditionalOfferInfo, getAllowedDiscount, getDiscount, getDiscountForPercentOffer, getDouble, getFormulaDiscount, getFormulaResult, getMaximumDiscount, getMinimumDiscount, getMinValue, getOfferId, getOfferValue, getPercentageDiscount, getPriceFacetDiscount, hasValueForProperty, isOfferExist, onFinish, prepareApplyAction
-
Field Details
-
PERSONALIZATION_TYPE
- See Also:
-
-
Constructor Details
-
ProductPersonalizationOffer
public ProductPersonalizationOffer()
-
-
Method Details
-
getUpdatedPersonalizationPrice
protected static double getUpdatedPersonalizationPrice(int quantityIndex, double price, List<PromotionOffer> offers, String type) This method provides functionality to get the updated personalization price- Parameters:
quantityIndex
- quantity index of the offerprice
- price of the productoffers
- An instance ofList
<PromotionOffer
>type
- Holds the type value- Returns:
- Returns the unit price of the product
-
applyOffer
Description copied from class:AbstractProductOfferAction
This method provides functionality to apply offer- Specified by:
applyOffer
in classAbstractProductOfferAction
- Parameters:
promotionOfferDO
- An instance ofPromotionOfferDO
promotion
- An instance ofPromotionDO
-
getOffer
Description copied from class:AbstractProductOfferAction
This method provides functionality to get offer- Specified by:
getOffer
in classAbstractProductOfferAction
- Parameters:
promotionOfferDO
- An instance ofPromotionOfferDO
promotion
- An instance ofPromotionDO
sku
- An instance ofPromotionSku
-
getTotalPriceForCurrentBatch
protected double getTotalPriceForCurrentBatch()Description copied from class:AbstractProductOfferAction
Functionalities to calculate total unitPrice/ShippingCost for current batch- Specified by:
getTotalPriceForCurrentBatch
in classAbstractProductOfferAction
- Returns:
- return totalPrice in double
-
getTotalPricePerBatch
Description copied from class:AbstractProductOfferAction
Functionalities to calculate total unitPrice/ShippingCost per batch- Specified by:
getTotalPricePerBatch
in classAbstractProductOfferAction
- Parameters:
skus
- An instance ofList
<PromotionSku
- Returns:
- return totalPrice in double
-
getTotalPriceForCurrentBatch
Description copied from class:AbstractProductOfferAction
Functionalities to calculate total unitPrice/ShippingCost for current batch- Specified by:
getTotalPriceForCurrentBatch
in classAbstractProductOfferAction
- Parameters:
priceFacets
- contains priceFacets
-
getTotalPricePerBatch
Description copied from class:AbstractProductOfferAction
Functionalities to calculate total unitPrice/ShippingCost per batch- Specified by:
getTotalPricePerBatch
in classAbstractProductOfferAction
- Parameters:
skus
- An instance ofList
<PromotionSku
priceFacets
- contains priceFacets
-