RAOAction hierarchy instead@Deprecated public class DefaultAddOrderEntryDiscountRAOAction extends AbstractCommerceRAOAction implements AddOrderEntryDiscountRAOAction
| Constructor and Description |
|---|
DefaultAddOrderEntryDiscountRAOAction()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<DiscountRAO> |
addDiscountAndConsume(List<EntriesSelectionStrategyRPD> selectionStrategies,
boolean absolute,
BigDecimal price,
RuleEngineResultRAO result,
KnowledgeHelper context)
Deprecated.
|
List<DiscountRAO> |
addOrderEntryLevelDiscount(List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs,
boolean absolute,
BigDecimal amount,
RuleEngineResultRAO result,
Object ruleContext)
Deprecated.
Adds order entry level discounts to the order entries selected by strategies from
entriesSelectionStrategyRPDs which are marked to be target for the action. |
DiscountRAO |
addOrderEntryLevelDiscount(OrderEntryRAO orderEntryRao,
boolean absolute,
BigDecimal amount,
RuleEngineResultRAO result,
Object ruleContext)
Deprecated.
Adds an order entry level discount to the given
orderEntryRao, recalculates the cart totals and returns
the discount. |
List<DiscountRAO> |
addOrderEntryLevelDiscounts(Collection<OrderEntryRAO> orderEntryList,
boolean absolute,
BigDecimal amount,
RuleEngineResultRAO result,
Object ruleContext)
Deprecated.
Adds an order entry level discount for each order entry element in
orderEntryList, recalculates the cart
totals and returns the discount. |
protected boolean |
mergeDiscounts(DiscountRAO discountRao,
OrderEntryRAO entry,
KnowledgeHelper context)
Deprecated.
|
adjustStrategyQuantity, adjustUnitPrice, adjustUnitPrice, consumeOrderEntries, consumeOrderEntries, consumeOrderEntry, consumeOrderEntry, createOrderEntryConsumedRAO, getBeanName, getEntriesSelectionStrategies, getNotExecutableActionStrategy, getRaoUtils, getRuleConfigurationRRD, getRuleEngineCalculationService, getRuleGroupExecutionRRD, getSelectedOrderEntryQuantities, getSelectedOrderEntryRaos, hasEnoughQuantity, hasEnoughQuantity, setBeanName, setEntriesSelectionStrategies, setNotExecutableActionStrategy, setRAOMetaData, setRaoUtils, setRuleEngineCalculationService, splitEntriesSelectionStrategies, trackRuleExecution, trackRuleGroupExecution, trackRuleGroupExecutions, updateActionRAOWithConsumed, validateCurrencyIsoCode, validateSelectionStrategycheckAndGetRuleContext, getConfigurationService, getMetaDataFromRule, getMetaDataFromRule, getRuleCode, insertFacts, insertFacts, setConfigurationService, updateFacts, validateRulepublic DefaultAddOrderEntryDiscountRAOAction()
public DiscountRAO addOrderEntryLevelDiscount(OrderEntryRAO orderEntryRao, boolean absolute, BigDecimal amount, RuleEngineResultRAO result, Object ruleContext)
AddOrderEntryDiscountRAOActionorderEntryRao, recalculates the cart totals and returns
the discount. The absolute flag determines whether the discount is absolute or percentage based. For
absolute values, the cart's currency is used. The amount specifies the amount used, e.g. $20 or 10%. The
ruleContext can be used to enhance the returned DiscountRAO.addOrderEntryLevelDiscount in interface AddOrderEntryDiscountRAOActionorderEntryRao - the OrderEntryRAO to apply the discount toabsolute - the type of discountamount - the amount of the discountresult - the result raoruleContext - an optional context object that can be used to provide additional information for the returned
DiscountRAOpublic List<DiscountRAO> addOrderEntryLevelDiscounts(Collection<OrderEntryRAO> orderEntryList, boolean absolute, BigDecimal amount, RuleEngineResultRAO result, Object ruleContext)
AddOrderEntryDiscountRAOActionorderEntryList, recalculates the cart
totals and returns the discount. The absolute flag determines whether the discount is absolute or
percentage based. For absolute values, the cart's currency is used. The amount specifies the amount used,
e.g. $20 or 10%. The ruleContext can be used to enhance the returned DiscountRAO.addOrderEntryLevelDiscounts in interface AddOrderEntryDiscountRAOActionorderEntryList - Collection of OrderEntryRAO to apply the discount toabsolute - the type of discountamount - the amount of the discountresult - the result raoruleContext - an optional context object that can be used to provide additional information for the returned
DiscountRAOpublic List<DiscountRAO> addOrderEntryLevelDiscount(List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs, boolean absolute, BigDecimal amount, RuleEngineResultRAO result, Object ruleContext)
AddOrderEntryDiscountRAOActionentriesSelectionStrategyRPDs which are marked to be target for the action. The discount is either absolute
or percentage.addOrderEntryLevelDiscount in interface AddOrderEntryDiscountRAOActionentriesSelectionStrategyRPDs - list of strategies used to select order entries and their applicable quantities. Discounts are created
for the entries from the strategies which have isTargetOfAction = true. Other entries are just
consumed, but not discounted.absolute - type of discount to be applied. Absolute discount will provide a currency amount discount, rather than a
percentage.amount - amount of discount to apply. Can be currency amount of percentageresult - RuleEngineResultRAO that will be updated with discountsruleContext - an optional context object that can be used to provide additional information for the returned
DiscountRAOprotected List<DiscountRAO> addDiscountAndConsume(List<EntriesSelectionStrategyRPD> selectionStrategies, boolean absolute, BigDecimal price, RuleEngineResultRAO result, KnowledgeHelper context)
protected boolean mergeDiscounts(DiscountRAO discountRao, OrderEntryRAO entry, KnowledgeHelper context)
Copyright © 2017 SAP SE. All Rights Reserved.