|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KnowledgeHelper
KnowledgeHelper implementation types are injected into consequenses instrumented at compile time and instances passed at runtime. It provides convenience methods for users to interact with the WorkingMemory.
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.
Method Summary | ||
---|---|---|
void |
cancelRemainingPreviousLogicalDependencies()
|
|
|
don(K core,
Class<T> trait)
|
|
|
don(K core,
Class<T> trait,
boolean logical)
|
|
|
don(Thing<K> core,
Class<T> trait)
|
|
|
don(Thing<K> core,
Class<T> trait,
boolean logical)
|
|
Object |
get(Declaration declaration)
|
|
Activation |
getActivation()
|
|
org.drools.runtime.Channel |
getChannel(String id)
|
|
Map<String,org.drools.runtime.Channel> |
getChannels()
|
|
|
getContext(Class<T> contextClass)
|
|
Declaration |
getDeclaration(String identifier)
|
|
org.drools.runtime.rule.WorkingMemoryEntryPoint |
getEntryPoint(String id)
|
|
Map<String,org.drools.runtime.rule.WorkingMemoryEntryPoint> |
getEntryPoints()
|
|
org.drools.runtime.ExitPoint |
getExitPoint(String id)
Deprecated. Use getChannel(String) instead. |
|
Map<String,org.drools.runtime.ExitPoint> |
getExitPoints()
Deprecated. Use getChannels() instead. |
|
FactHandle |
getFactHandle(FactHandle handle)
|
|
FactHandle |
getFactHandle(Object object)
|
|
IdentityHashMap<Object,FactHandle> |
getIdentityMap()
|
|
Rule |
getRule()
|
|
Tuple |
getTuple()
|
|
WorkingMemory |
getWorkingMemory()
|
|
void |
halt()
|
|
void |
insert(Object object)
Asserts an object, notice that it does not return the FactHandle |
|
void |
insert(Object object,
boolean dynamic)
Asserts an object specifying that it implement the onPropertyChange listener, notice that it does not return the FactHandle. |
|
void |
insertLogical(Object object)
|
|
void |
insertLogical(Object object,
boolean dynamic)
|
|
void |
modify(Object newObject)
|
|
void |
reset()
|
|
void |
retract(FactHandle handle)
|
|
void |
retract(Object handle)
|
|
void |
setActivation(Activation agendaItem)
|
|
void |
setFocus(String focus)
|
|
void |
setIdentityMap(IdentityHashMap<Object,FactHandle> identityMap)
|
|
|
shed(Thing<K> thing,
Class<T> trait)
|
|
|
shed(TraitableBean<K> core,
Class<T> trait)
|
|
void |
update(FactHandle newObject)
|
|
void |
update(FactHandle handle,
Object newObject)
|
|
void |
update(Object newObject)
|
Methods inherited from interface org.drools.runtime.rule.RuleContext |
---|
blockActivation, cancelActivation, unblockAllActivations |
Methods inherited from interface org.drools.runtime.KnowledgeContext |
---|
getKnowledgeRuntime |
Method Detail |
---|
void setActivation(Activation agendaItem)
void reset()
void insert(Object object)
object
- -
the object to be assertedvoid insert(Object object, boolean dynamic)
object
- -
the object to be asserteddynamic
- -
specifies the object implements onPropertyChangeListenervoid insertLogical(Object object)
insertLogical
in interface org.drools.runtime.rule.RuleContext
void insertLogical(Object object, boolean dynamic)
void cancelRemainingPreviousLogicalDependencies()
FactHandle getFactHandle(Object object)
FactHandle getFactHandle(FactHandle handle)
void update(FactHandle handle, Object newObject)
void update(FactHandle newObject)
void update(Object newObject)
void modify(Object newObject)
void retract(FactHandle handle)
void retract(Object handle)
Object get(Declaration declaration)
Rule getRule()
getRule
in interface org.drools.runtime.rule.RuleContext
Tuple getTuple()
Activation getActivation()
getActivation
in interface org.drools.runtime.rule.RuleContext
WorkingMemory getWorkingMemory()
org.drools.runtime.rule.WorkingMemoryEntryPoint getEntryPoint(String id)
Map<String,org.drools.runtime.rule.WorkingMemoryEntryPoint> getEntryPoints()
@Deprecated org.drools.runtime.ExitPoint getExitPoint(String id)
getChannel(String)
instead.
@Deprecated Map<String,org.drools.runtime.ExitPoint> getExitPoints()
getChannels()
instead.
org.drools.runtime.Channel getChannel(String id)
Map<String,org.drools.runtime.Channel> getChannels()
void setFocus(String focus)
Declaration getDeclaration(String identifier)
void halt()
IdentityHashMap<Object,FactHandle> getIdentityMap()
void setIdentityMap(IdentityHashMap<Object,FactHandle> identityMap)
<T> T getContext(Class<T> contextClass)
<T,K> T don(K core, Class<T> trait, boolean logical)
<T,K> T don(Thing<K> core, Class<T> trait, boolean logical)
<T,K> T don(K core, Class<T> trait)
<T,K> T don(Thing<K> core, Class<T> trait)
<T,K> Thing<K> shed(Thing<K> thing, Class<T> trait)
<T,K> Thing<K> shed(TraitableBean<K> core, Class<T> trait)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |