public class DefaultDroolsRuleActionContext extends Object implements RuleActionContext
RuleActionContext for the drools rule engine.| Constructor and Description |
|---|
DefaultDroolsRuleActionContext(Map<String,Object> variables,
Object helper) |
| Modifier and Type | Method and Description |
|---|---|
protected KnowledgeHelper |
checkAndGetRuleContext(Object ruleContext) |
protected <T> Set<T> |
evaluateValues(Class<T> type,
List<T> values,
String... path) |
protected <T> Set<T> |
evaluateValues(Class<T> type,
Set<T> values,
String... path) |
protected <T> Set<T> |
findValues(Class<T> type,
String... path) |
CartRAO |
getCartRao()
Get cart RAO
|
Object |
getDelegate()
Returns a rule engine specific context object.
|
String |
getMetaData(String key)
Returns the rule's meta-data for the given key (or
null). |
RuleEngineResultRAO |
getRuleEngineResultRao()
Get rule engine result RAO
|
Map<String,Object> |
getRuleMetadata()
get rule metadata
|
String |
getRuleName()
Get the name of the rule
|
<T> T |
getValue(Class<T> type)
Returns the value for a specific type from the default variables container.
|
<T> T |
getValue(Class<T> type,
String... path)
Returns the value for a specific type and variables container.
|
<T> Set<T> |
getValues(Class<T> type)
Returns the values for a specific type from the default variables container.
|
<T> Set<T> |
getValues(Class<T> type,
String... path)
Returns the values for a specific type and variables container.
|
Map<String,Object> |
getVariables() |
void |
insertFacts(Collection facts)
Insert the facts in a collection to a context
|
void |
insertFacts(Object... facts)
Insert the facts in an array to a context
|
void |
updateFacts(Object... facts)
Update the facts in a context
|
public Object getDelegate()
RuleActionContextgetDelegate in interface RuleActionContextpublic String getMetaData(String key)
RuleActionContextnull). Calls toString() on the meta-data
object.getMetaData in interface RuleActionContextpublic <T> T getValue(Class<T> type)
RuleActionContextgetValue in interface RuleActionContexttype - - the typepublic <T> Set<T> getValues(Class<T> type)
RuleActionContextgetValues in interface RuleActionContexttype - - the typepublic <T> T getValue(Class<T> type, String... path)
RuleActionContextgetValue in interface RuleActionContexttype - - the typepath - - the path for the variables containerpublic <T> Set<T> getValues(Class<T> type, String... path)
RuleActionContextgetValues in interface RuleActionContexttype - - the typepath - - the path for the variables containerpublic void insertFacts(Object... facts)
RuleActionContextinsertFacts in interface RuleActionContextfacts - - the array of factspublic void updateFacts(Object... facts)
RuleActionContextupdateFacts in interface RuleActionContextfacts - - the array of factspublic void insertFacts(Collection facts)
RuleActionContextinsertFacts in interface RuleActionContextfacts - - the collection of factspublic CartRAO getCartRao()
RuleActionContextgetCartRao in interface RuleActionContextpublic RuleEngineResultRAO getRuleEngineResultRao()
RuleActionContextgetRuleEngineResultRao in interface RuleActionContextpublic String getRuleName()
RuleActionContextgetRuleName in interface RuleActionContextpublic Map<String,Object> getRuleMetadata()
RuleActionContextgetRuleMetadata in interface RuleActionContextprotected KnowledgeHelper checkAndGetRuleContext(Object ruleContext)
Copyright © 2017 SAP SE. All Rights Reserved.