RAOAction hierarchy instead@Deprecated public abstract class AbstractCommerceRAOAction extends AbstractDroolsRuleAction
| Constructor and Description |
|---|
AbstractCommerceRAOAction()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
adjustStrategyQuantity(List<EntriesSelectionStrategyRPD> selectionStrategyRPDs,
int maxCount)
Deprecated.
Adjusts the quantity fields of EntriesSelectionStrategyRPD such that the maximum possible number of entries will
be consumed by the action.
|
protected BigDecimal |
adjustUnitPrice(OrderEntryRAO orderEntryRao)
Deprecated.
|
protected BigDecimal |
adjustUnitPrice(OrderEntryRAO orderEntryRao,
int quantity)
Deprecated.
|
protected Set<OrderEntryConsumedRAO> |
consumeOrderEntries(Collection<EntriesSelectionStrategyRPD> strategies,
AbstractRuleActionRAO actionRAO)
Deprecated.
Creates new
OrderEntryConusmedRAOs for the given strategies, links them to the given actionRAO and
reduces available quantity of order entry by given quantity for every Order Entry from the set and using quantity
from discountedOrderEntryMap. |
protected Set<OrderEntryConsumedRAO> |
consumeOrderEntries(Set<OrderEntryRAO> selectedEntries,
Map<Integer,Integer> selectedEntriesMap,
AbstractRuleActionRAO actionRAO)
Deprecated.
Creates new
OrderEntryConusmedRAOs with the given quantity, links it to the given actionRAO and
reduces available quantity of order entry by given quantity for every Order Entry from the set and using quantity
from discountedOrderEntryMap. |
protected OrderEntryConsumedRAO |
consumeOrderEntry(OrderEntryRAO orderEntryRAO,
AbstractRuleActionRAO actionRAO)
Deprecated.
Creates a new
OrderEntryConusmedRAO that consumes the given orderEntryRAO and adds the consumed entry to
the given actionRAO |
protected OrderEntryConsumedRAO |
consumeOrderEntry(OrderEntryRAO orderEntryRAO,
int quantity,
BigDecimal discountValue,
AbstractRuleActionRAO actionRAO)
Deprecated.
|
protected OrderEntryConsumedRAO |
createOrderEntryConsumedRAO(OrderEntryRAO orderEntryRAO,
int quantity,
BigDecimal discountValue)
Deprecated.
|
protected String |
getBeanName()
Deprecated.
|
protected Map<OrderEntrySelectionStrategy,EntriesSelectionStrategy> |
getEntriesSelectionStrategies()
Deprecated.
|
protected NotExecutableActionStrategy |
getNotExecutableActionStrategy()
Deprecated.
|
protected RaoUtils |
getRaoUtils()
Deprecated.
|
protected RuleConfigurationRRD |
getRuleConfigurationRRD(String ruleCode,
KnowledgeHelper context)
Deprecated.
retrieves the RuleConfigurationRRD for the given ruleCode from the given context.
|
protected RuleEngineCalculationService |
getRuleEngineCalculationService()
Deprecated.
|
protected RuleGroupExecutionRRD |
getRuleGroupExecutionRRD(String ruleGroupCode,
KnowledgeHelper context)
Deprecated.
retrieves the RuleGroupExecutionRRD for the given ruleGroupCode from the given context.
|
protected Map<Integer,Integer> |
getSelectedOrderEntryQuantities(Collection<EntriesSelectionStrategyRPD> strategies)
Deprecated.
Gets Order Entry identifiers (orderEntry.entryNumber) and Unit Quantity To Be Consumed for the Order Entries.
|
protected Set<OrderEntryRAO> |
getSelectedOrderEntryRaos(Collection<EntriesSelectionStrategyRPD> selectionStrategyRPDs,
Map<Integer,Integer> selectedOrderEntryMap)
Deprecated.
Gets Order Entry set to be discounted as a result of bundle processing.
|
protected boolean |
hasEnoughQuantity(EntriesSelectionStrategyRPD entriesSelectionStrategyRPD)
Deprecated.
|
protected boolean |
hasEnoughQuantity(List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs)
Deprecated.
|
void |
setBeanName(String raoActionBeanName)
Deprecated.
|
void |
setEntriesSelectionStrategies(Map<OrderEntrySelectionStrategy,EntriesSelectionStrategy> unitForBundleSelectorStrategies)
Deprecated.
|
void |
setNotExecutableActionStrategy(NotExecutableActionStrategy notExecutableActionStrategy)
Deprecated.
|
protected void |
setRAOMetaData(KnowledgeHelper context,
AbstractRuleActionRAO... raos)
Deprecated.
|
void |
setRaoUtils(RaoUtils raoUtils)
Deprecated.
|
void |
setRuleEngineCalculationService(RuleEngineCalculationService ruleEngineCalculationService)
Deprecated.
|
protected void |
splitEntriesSelectionStrategies(List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs,
List<EntriesSelectionStrategyRPD> selectionStrategyRPDsForAction,
List<EntriesSelectionStrategyRPD> selectionStrategyRPDsForTriggering)
Deprecated.
|
protected void |
trackRuleExecution(KnowledgeHelper context)
Deprecated.
Tracks this rule's execution by incrementing the
RuleConfigurationRRD.getCurrentRuns() for the currently
executing rule. |
protected void |
trackRuleGroupExecution(RuleGroupExecutionRRD execution,
RuleConfigurationRRD config)
Deprecated.
Updates the given
RuleGroupExecutionRRD by adding the config.getRuleCode() to the
execution.getExecutedRules(). |
protected void |
trackRuleGroupExecutions(KnowledgeHelper context)
Deprecated.
Adds this rule's execution to all RuleGroupExecutionRRD for each of this rule's defined ruleGroups.
|
protected void |
updateActionRAOWithConsumed(AbstractRuleActionRAO actionRAO,
OrderEntryConsumedRAO orderEntryConsumedRAO)
Deprecated.
|
protected void |
validateCurrencyIsoCode(boolean absolute,
String currencyIsoCode)
Deprecated.
validates currencyIsoCode based on absolute flag value
|
protected void |
validateSelectionStrategy(Collection<EntriesSelectionStrategyRPD> strategies,
String ruleName)
Deprecated.
Validates
entriesSelectionStrategyRPDs checking if the collection is not empty, if orderEntries list of
each entry of entriesSelectionStrategyRPDs is not empty and all the orderEntries are from the same Order. |
checkAndGetRuleContext, getConfigurationService, getMetaDataFromRule, getMetaDataFromRule, getRuleCode, insertFacts, insertFacts, setConfigurationService, updateFacts, validateRuleprotected Map<Integer,Integer> getSelectedOrderEntryQuantities(Collection<EntriesSelectionStrategyRPD> strategies)
strategies - list of EntriesSelectionStrategyRPD to pickup units according to the strategiesprotected Set<OrderEntryRAO> getSelectedOrderEntryRaos(Collection<EntriesSelectionStrategyRPD> selectionStrategyRPDs, Map<Integer,Integer> selectedOrderEntryMap)
selectionStrategyRPDs - list of EntriesSelectionStrategyRPD to pickup units according to the strategiesselectedOrderEntryMap - Map having orderEntry.entryNumber as keys and Unit Quantity To Be Consumed as valuesprotected void validateSelectionStrategy(Collection<EntriesSelectionStrategyRPD> strategies, String ruleName)
entriesSelectionStrategyRPDs checking if the collection is not empty, if orderEntries list of
each entry of entriesSelectionStrategyRPDs is not empty and all the orderEntries are from the same Order.strategies - collection of EntriesSelectionStrategyRPD to check.ruleName - the rule nameprotected Set<OrderEntryConsumedRAO> consumeOrderEntries(Collection<EntriesSelectionStrategyRPD> strategies, AbstractRuleActionRAO actionRAO)
OrderEntryConusmedRAOs for the given strategies, links them to the given actionRAO and
reduces available quantity of order entry by given quantity for every Order Entry from the set and using quantity
from discountedOrderEntryMap.strategies - the selection strategiesactionRAO - the actionRAO to add the newly created consumed entries toprotected Set<OrderEntryConsumedRAO> consumeOrderEntries(Set<OrderEntryRAO> selectedEntries, Map<Integer,Integer> selectedEntriesMap, AbstractRuleActionRAO actionRAO)
OrderEntryConusmedRAOs with the given quantity, links it to the given actionRAO and
reduces available quantity of order entry by given quantity for every Order Entry from the set and using quantity
from discountedOrderEntryMap.selectedEntries - Order Entries to be consumedselectedEntriesMap - Map having orderEntry.entryNumber as keys and Unit Quantity To Be Consumed as valuesactionRAO - the actionRAO to add the newly created consumed entries toprotected OrderEntryConsumedRAO consumeOrderEntry(OrderEntryRAO orderEntryRAO, AbstractRuleActionRAO actionRAO)
OrderEntryConusmedRAO that consumes the given orderEntryRAO and adds the consumed entry to
the given actionRAOorderEntryRAO - the order entry to consumeactionRAO - the action rao to add the consumed entry toprotected OrderEntryConsumedRAO consumeOrderEntry(OrderEntryRAO orderEntryRAO, int quantity, BigDecimal discountValue, AbstractRuleActionRAO actionRAO)
orderEntryRAO - the order entry to consumeactionRAO - the action rao to add the consumed entry toquantity - the quantity to consumediscountValue - the discount this order entry consumption gave@Deprecated protected OrderEntryConsumedRAO createOrderEntryConsumedRAO(OrderEntryRAO orderEntryRAO, int quantity, BigDecimal discountValue)
orderEntryRAO - OrderEntryRAO to create consumed entry forquantity - Consumed quantitydiscountValue - the discount this order entry consumption gave@Deprecated protected void updateActionRAOWithConsumed(AbstractRuleActionRAO actionRAO, OrderEntryConsumedRAO orderEntryConsumedRAO)
actionRAO - AbstractRuleActionRAO to be updatedorderEntryConsumedRAO - to be added to the AbstractRuleActionRAOprotected BigDecimal adjustUnitPrice(OrderEntryRAO orderEntryRao, int quantity)
protected BigDecimal adjustUnitPrice(OrderEntryRAO orderEntryRao)
protected RuleConfigurationRRD getRuleConfigurationRRD(String ruleCode, KnowledgeHelper context)
ruleCode - the rule codecontext - the drools rule contextprotected RuleGroupExecutionRRD getRuleGroupExecutionRRD(String ruleGroupCode, KnowledgeHelper context)
ruleGroupCode - the rule group codecontext - the drools rule contextprotected void trackRuleExecution(KnowledgeHelper context)
RuleConfigurationRRD.getCurrentRuns() for the currently
executing rule.context - the drools specific contextprotected void trackRuleGroupExecutions(KnowledgeHelper context)
context - the drools specific rule contextprotected void trackRuleGroupExecution(RuleGroupExecutionRRD execution, RuleConfigurationRRD config)
RuleGroupExecutionRRD by adding the config.getRuleCode() to the
execution.getExecutedRules().protected void validateCurrencyIsoCode(boolean absolute,
String currencyIsoCode)
absolute - the absolute flagcurrencyIsoCode - if absolute is true the currencyIsoCode must not be null, otherwise should be null (non-null value is
ignored)protected void setRAOMetaData(KnowledgeHelper context,
AbstractRuleActionRAO... raos)
protected void splitEntriesSelectionStrategies(List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs, List<EntriesSelectionStrategyRPD> selectionStrategyRPDsForAction, List<EntriesSelectionStrategyRPD> selectionStrategyRPDsForTriggering)
@Deprecated protected boolean hasEnoughQuantity(List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs)
entriesSelectionStrategyRPDs have enough quantity.entriesSelectionStrategyRPDs - List of EntriesSelectionStrategyRPD to check@Deprecated protected boolean hasEnoughQuantity(EntriesSelectionStrategyRPD entriesSelectionStrategyRPD)
entriesSelectionStrategyRPD - EntriesSelectionStrategyRPD to check the quantity forprotected int adjustStrategyQuantity(List<EntriesSelectionStrategyRPD> selectionStrategyRPDs, int maxCount)
selectionStrategyRPDs - list of EntriesSelectionStrategyRPD to be updatedmaxCount - when maxCount is greater than 0, this parameter acts as an absolute maximum for the multiple.protected Map<OrderEntrySelectionStrategy,EntriesSelectionStrategy> getEntriesSelectionStrategies()
public void setEntriesSelectionStrategies(Map<OrderEntrySelectionStrategy,EntriesSelectionStrategy> unitForBundleSelectorStrategies)
protected RuleEngineCalculationService getRuleEngineCalculationService()
public void setRuleEngineCalculationService(RuleEngineCalculationService ruleEngineCalculationService)
protected NotExecutableActionStrategy getNotExecutableActionStrategy()
public void setNotExecutableActionStrategy(NotExecutableActionStrategy notExecutableActionStrategy)
protected RaoUtils getRaoUtils()
public void setRaoUtils(RaoUtils raoUtils)
public void setBeanName(String raoActionBeanName)
protected String getBeanName()
Copyright © 2017 SAP SE. All Rights Reserved.