|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 modifyObject 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 |
assertLogicalObject(java.lang.Object object)
|
void |
assertLogicalObject(java.lang.Object object,
boolean dynamic)
|
void |
assertObject(java.lang.Object object)
Asserts an object, notice that it does not return the FactHandle |
void |
assertObject(java.lang.Object object,
boolean dynamic)
Asserts an object specifying that it implement the onPropertyChange listener, notice that it does not return the FactHandle. |
void |
clearAgenda()
Clears the agenda causing all existing Activations to fire ActivationCancelled events. |
void |
clearAgendaGroup(java.lang.String group)
|
java.lang.Object |
get(Declaration declaration)
|
Activation |
getActivation()
|
AgendaGroup |
getFocus()
|
java.util.List |
getObjects()
|
java.util.List |
getObjects(java.lang.Class objectClass)
Retruns a List of Objects that match the given Class in the paremeter. |
QueryResults |
getQueryResults(java.lang.String query)
|
Rule |
getRule()
|
Tuple |
getTuple()
|
WorkingMemory |
getWorkingMemory()
|
void |
modifyObject(FactHandle handle,
java.lang.Object newObject)
|
void |
retractObject(FactHandle handle)
|
void |
setFocus(AgendaGroup focus)
|
void |
setFocus(java.lang.String focus)
|
| Method Detail |
public void assertObject(java.lang.Object object)
throws FactException
FactException - -
Exceptions can be thrown by conditions which are wrapped and
returned as a FactExceptionobject - -
the object to be asserted
public void assertObject(java.lang.Object object,
boolean dynamic)
throws FactException
FactException - -
Exceptions can be thrown by conditions which are wrapped and
returned as a FactExceptionobject - -
the object to be asserteddynamic - -
specifies the object implements onPropertyChangeListener
public void assertLogicalObject(java.lang.Object object)
throws FactException
FactException
public void assertLogicalObject(java.lang.Object object,
boolean dynamic)
throws FactException
FactException
public void modifyObject(FactHandle handle,
java.lang.Object newObject)
throws FactException
FactException
public void retractObject(FactHandle handle)
throws FactException
FactExceptionpublic java.lang.Object get(Declaration declaration)
public Rule getRule()
public Tuple getTuple()
public Activation getActivation()
public WorkingMemory getWorkingMemory()
public java.util.List getObjects()
public java.util.List getObjects(java.lang.Class objectClass)
objectClass - -
The Class to filter by
public QueryResults getQueryResults(java.lang.String query)
public void clearAgenda()
public void clearAgendaGroup(java.lang.String group)
public AgendaGroup getFocus()
public void setFocus(java.lang.String focus)
public void setFocus(AgendaGroup focus)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||