org.drools.base
Class DefaultKnowledgeHelper
java.lang.Object
org.drools.base.DefaultKnowledgeHelper
- All Implemented Interfaces:
- KnowledgeHelper
- public class DefaultKnowledgeHelper
- extends java.lang.Object
- implements KnowledgeHelper
-
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultKnowledgeHelper
public DefaultKnowledgeHelper(Activation agendaItem,
WorkingMemory workingMemory)
assertObject
public void assertObject(java.lang.Object object)
throws FactException
- Description copied from interface:
KnowledgeHelper
- Asserts an object, notice that it does not return the FactHandle
- Specified by:
assertObject in interface KnowledgeHelper
- Throws:
FactException- Parameters:
object - -
the object to be asserted
assertObject
public void assertObject(java.lang.Object object,
boolean dynamic)
throws FactException
- Description copied from interface:
KnowledgeHelper
- Asserts an object specifying that it implement the onPropertyChange
listener, notice that it does not return the FactHandle.
- Specified by:
assertObject in interface KnowledgeHelper
- Throws:
FactException- Parameters:
object - -
the object to be asserteddynamic - -
specifies the object implements onPropertyChangeListener
assertLogicalObject
public void assertLogicalObject(java.lang.Object object)
throws FactException
- Specified by:
assertLogicalObject in interface KnowledgeHelper
- Throws:
FactException
assertLogicalObject
public void assertLogicalObject(java.lang.Object object,
boolean dynamic)
throws FactException
- Specified by:
assertLogicalObject in interface KnowledgeHelper
- Throws:
FactException
modifyObject
public void modifyObject(FactHandle handle,
java.lang.Object newObject)
throws FactException
- Specified by:
modifyObject in interface KnowledgeHelper
- Throws:
FactException
retractObject
public void retractObject(FactHandle handle)
throws FactException
- Specified by:
retractObject in interface KnowledgeHelper
- Throws:
FactException
getRule
public Rule getRule()
- Specified by:
getRule in interface KnowledgeHelper
- Returns:
- - The rule name
getObjects
public java.util.List getObjects()
- Specified by:
getObjects in interface KnowledgeHelper
- Returns:
- - A List of the objects in the WorkingMemory
getObjects
public java.util.List getObjects(java.lang.Class objectClass)
- Description copied from interface:
KnowledgeHelper
- Retruns a List of Objects that match the given Class in the paremeter.
- Specified by:
getObjects in interface KnowledgeHelper
- Parameters:
objectClass - -
The Class to filter by
- Returns:
- - All the Objects in the WorkingMemory that match the given Class
filter
clearAgenda
public void clearAgenda()
- Description copied from interface:
KnowledgeHelper
- Clears the agenda causing all existing Activations to fire
ActivationCancelled events.
- Specified by:
clearAgenda in interface KnowledgeHelper
clearAgendaGroup
public void clearAgendaGroup(java.lang.String group)
- Specified by:
clearAgendaGroup in interface KnowledgeHelper
get
public java.lang.Object get(Declaration declaration)
- Specified by:
get in interface KnowledgeHelper
getTuple
public Tuple getTuple()
- Specified by:
getTuple in interface KnowledgeHelper
getWorkingMemory
public WorkingMemory getWorkingMemory()
- Specified by:
getWorkingMemory in interface KnowledgeHelper
getActivation
public Activation getActivation()
- Specified by:
getActivation in interface KnowledgeHelper
getQueryResults
public QueryResults getQueryResults(java.lang.String query)
- Specified by:
getQueryResults in interface KnowledgeHelper
getFocus
public AgendaGroup getFocus()
- Specified by:
getFocus in interface KnowledgeHelper
setFocus
public void setFocus(java.lang.String focus)
- Specified by:
setFocus in interface KnowledgeHelper
setFocus
public void setFocus(AgendaGroup focus)
- Specified by:
setFocus in interface KnowledgeHelper