public class DefaultOrderEntryAdjustActionStrategy extends AbstractRuleActionStrategy<RuleBasedOrderEntryAdjustActionModel>
| Constructor and Description |
|---|
DefaultOrderEntryAdjustActionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustDiscountRaoValue(AbstractOrderEntryModel entry,
DiscountRAO discountRao,
java.math.BigDecimal discountAmount) |
java.util.List<PromotionResultModel> |
apply(AbstractRuleActionRAO action)
If the parameter action is of type
DiscountRAO and is applied to Order Entry the discount is added to
corresponding Order Entry model. |
protected RuleBasedOrderEntryAdjustActionModel |
createOrderEntryAdjustAction(PromotionResultModel promoResult,
AbstractRuleActionRAO action,
AbstractOrderEntryModel entry,
java.math.BigDecimal discountAmount) |
protected long |
getConsumedQuantity(PromotionResultModel promoResult)
Sums up quantities of all consumed entries of given order entry.
|
void |
undo(ItemModel action)
Revokes the Promotion Action that was applied.
|
createPromotionAction, getActionUtils, getCalculationService, getExtendedOrderDao, getForceImmediateRecalculation, getMetadataHandlers, getModelService, getPromotionAction, getPromotionActionService, getPromotionResultUtils, getRuleActionMetadataHandlers, getStrategyId, handleActionMetadata, handleUndoActionMetadata, recalculateIfNeeded, setActionUtils, setBeanName, setCalculationService, setExtendedOrderDao, setForceImmediateRecalculation, setModelService, setPromotionAction, setPromotionActionService, setPromotionResultUtils, setRuleActionMetadataHandlers, undoInternalpublic DefaultOrderEntryAdjustActionStrategy()
public java.util.List<PromotionResultModel> apply(AbstractRuleActionRAO action)
DiscountRAO and is applied to Order Entry the discount is added to
corresponding Order Entry model.action - the action to applyPromotionResultModel as a result of the DiscountRAO application.protected void adjustDiscountRaoValue(AbstractOrderEntryModel entry, DiscountRAO discountRao, java.math.BigDecimal discountAmount)
protected RuleBasedOrderEntryAdjustActionModel createOrderEntryAdjustAction(PromotionResultModel promoResult, AbstractRuleActionRAO action, AbstractOrderEntryModel entry, java.math.BigDecimal discountAmount)
public void undo(ItemModel action)
RuleActionStrategyaction - the action to be undoneprotected long getConsumedQuantity(PromotionResultModel promoResult)
promoResult - AbstractOrderEntryModel to find consumed quantity forCopyright © 2018 SAP SE. All Rights Reserved.