public interface KnowledgeHelper extends org.kie.api.runtime.rule.RuleContext, Serializable
Of particular interest is the update method as it allows an object to be modified without having to specify the facthandle, because they are not passed to the consequence at runtime. To achieve this the implementation will need to lookup the fact handle of the object form the WorkingMemory.
Modifier and Type | Method and Description |
---|---|
InternalFactHandle |
bolster(Object object) |
InternalFactHandle |
bolster(Object object,
Object value) |
void |
cancelRemainingPreviousLogicalDependencies() |
void |
delete(org.kie.api.runtime.rule.FactHandle handle) |
void |
delete(org.kie.api.runtime.rule.FactHandle handle,
org.kie.api.runtime.rule.FactHandle.State fhState) |
void |
delete(Object handle) |
void |
delete(Object object,
org.kie.api.runtime.rule.FactHandle.State fhState) |
<T,K> T |
don(K core,
Class<T> trait) |
<T,K> T |
don(K core,
Class<T> trait,
boolean logical) |
<T,K> T |
don(K core,
Class<T> trait,
org.kie.api.internal.runtime.beliefs.Mode... modes) |
<T,K> T |
don(K core,
Collection<Class<? extends Thing>> trait) |
<T,K> T |
don(K core,
Collection<Class<? extends Thing>> trait,
boolean logical) |
<T,K> T |
don(K core,
Collection<Class<? extends Thing>> trait,
org.kie.api.internal.runtime.beliefs.Mode... modes) |
<T,K> T |
don(Thing<K> core,
Class<T> trait) |
Object |
get(Declaration declaration) |
org.kie.api.runtime.Channel |
getChannel(String id) |
Map<String,org.kie.api.runtime.Channel> |
getChannels() |
<T> T |
getContext(Class<T> contextClass) |
Declaration |
getDeclaration(String identifier) |
org.kie.api.runtime.rule.EntryPoint |
getEntryPoint(String id) |
InternalFactHandle |
getFactHandle(InternalFactHandle handle) |
InternalFactHandle |
getFactHandle(Object object) |
Activation |
getMatch() |
ClassLoader |
getProjectClassLoader() |
RuleImpl |
getRule() |
Tuple |
getTuple() |
WorkingMemory |
getWorkingMemory() |
void |
guard(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass) |
void |
guard(org.kie.api.runtime.rule.RuleUnit ruleUnit) |
void |
halt() |
InternalFactHandle |
insert(Object object)
Asserts an object
|
InternalFactHandle |
insert(Object object,
boolean dynamic)
Asserts an object specifying that it implement the onPropertyChange
listener
|
org.kie.api.runtime.rule.FactHandle |
insertAsync(Object object) |
InternalFactHandle |
insertLogical(Object object) |
InternalFactHandle |
insertLogical(Object object,
boolean dynamic) |
InternalFactHandle |
insertLogical(Object object,
org.kie.api.internal.runtime.beliefs.Mode... beliefs) |
InternalFactHandle |
insertLogical(Object object,
org.kie.api.internal.runtime.beliefs.Mode belief) |
void |
reset() |
void |
retract(org.kie.api.runtime.rule.FactHandle handle)
Deprecated.
Use delete
|
void |
retract(Object handle)
Deprecated.
Use delete
|
void |
run(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass) |
void |
run(org.kie.api.runtime.rule.RuleUnit ruleUnit) |
void |
setActivation(Activation agendaItem) |
void |
setFocus(String focus) |
<T,K> Thing<K> |
shed(Thing<K> thing,
Class<T> trait) |
<T,K,X extends TraitableBean> |
shed(TraitableBean<K,X> core,
Class<T> trait) |
void |
update(org.kie.api.runtime.rule.FactHandle newObject) |
void |
update(org.kie.api.runtime.rule.FactHandle newObject,
BitMask mask,
Class<?> modifiedClass) |
void |
update(org.kie.api.runtime.rule.FactHandle handle,
Object newObject) |
void |
update(Object newObject) |
void |
update(Object newObject,
BitMask mask,
Class<?> modifiedClass) |
void setActivation(Activation agendaItem)
void reset()
InternalFactHandle insert(Object object)
object
- -
the object to be assertedorg.kie.api.runtime.rule.FactHandle insertAsync(Object object)
InternalFactHandle insert(Object object, boolean dynamic)
object
- -
the object to be asserteddynamic
- -
specifies the object implements onPropertyChangeListenerInternalFactHandle insertLogical(Object object)
insertLogical
in interface org.kie.api.runtime.rule.RuleContext
InternalFactHandle insertLogical(Object object, boolean dynamic)
InternalFactHandle insertLogical(Object object, org.kie.api.internal.runtime.beliefs.Mode belief)
InternalFactHandle insertLogical(Object object, org.kie.api.internal.runtime.beliefs.Mode... beliefs)
void cancelRemainingPreviousLogicalDependencies()
InternalFactHandle getFactHandle(Object object)
InternalFactHandle getFactHandle(InternalFactHandle handle)
void update(org.kie.api.runtime.rule.FactHandle handle, Object newObject)
void update(org.kie.api.runtime.rule.FactHandle newObject)
void update(org.kie.api.runtime.rule.FactHandle newObject, BitMask mask, Class<?> modifiedClass)
void update(Object newObject)
void retract(org.kie.api.runtime.rule.FactHandle handle)
void retract(Object handle)
void delete(Object handle)
void delete(Object object, org.kie.api.runtime.rule.FactHandle.State fhState)
void delete(org.kie.api.runtime.rule.FactHandle handle)
void delete(org.kie.api.runtime.rule.FactHandle handle, org.kie.api.runtime.rule.FactHandle.State fhState)
Object get(Declaration declaration)
RuleImpl getRule()
getRule
in interface org.kie.api.runtime.rule.RuleContext
Tuple getTuple()
Activation getMatch()
getMatch
in interface org.kie.api.runtime.rule.RuleContext
WorkingMemory getWorkingMemory()
org.kie.api.runtime.rule.EntryPoint getEntryPoint(String id)
org.kie.api.runtime.Channel getChannel(String id)
void setFocus(String focus)
Declaration getDeclaration(String identifier)
void halt()
<T> T getContext(Class<T> contextClass)
<T,K> T don(K core, Class<T> trait, boolean logical)
<T,K> T don(K core, Class<T> trait, org.kie.api.internal.runtime.beliefs.Mode... modes)
<T,K> T don(K core, Class<T> trait)
<T,K> T don(K core, Collection<Class<? extends Thing>> trait, boolean logical)
<T,K> T don(K core, Collection<Class<? extends Thing>> trait, org.kie.api.internal.runtime.beliefs.Mode... modes)
<T,K> T don(K core, Collection<Class<? extends Thing>> trait)
<T,K,X extends TraitableBean> Thing<K> shed(TraitableBean<K,X> core, Class<T> trait)
InternalFactHandle bolster(Object object)
InternalFactHandle bolster(Object object, Object value)
ClassLoader getProjectClassLoader()
void run(org.kie.api.runtime.rule.RuleUnit ruleUnit)
void run(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass)
void guard(org.kie.api.runtime.rule.RuleUnit ruleUnit)
void guard(Class<? extends org.kie.api.runtime.rule.RuleUnit> ruleUnitClass)
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.