站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

DefaultKnowledgeHelper (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.base
Class DefaultKnowledgeHelper

java.lang.Object
  extended by org.drools.base.DefaultKnowledgeHelper
All Implemented Interfaces:
Serializable, KnowledgeHelper

public class DefaultKnowledgeHelper
extends Object
implements KnowledgeHelper

See Also:
Serialized Form

Constructor Summary
DefaultKnowledgeHelper(Activation agendaItem, WorkingMemory workingMemory)
           
DefaultKnowledgeHelper(WorkingMemory workingMemory)
           
 
Method Summary
 void assertLogicalObject(Object object)
           
 void assertLogicalObject(Object object, boolean dynamic)
           
 void assertObject(Object object)
          Asserts an object, notice that it does not return the FactHandle
 void assertObject(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(String group)
           
 Object get(Declaration declaration)
           
 Activation getActivation()
           
 Declaration getDeclaration(String identifier)
           
 AgendaGroup getFocus()
           
 List getObjects()
           
 List getObjects(Class objectClass)
          Retruns a List of Objects that match the given Class in the paremeter.
 QueryResults getQueryResults(String query)
           
 Rule getRule()
           
 Tuple getTuple()
           
 WorkingMemory getWorkingMemory()
           
 void modifyObject(FactHandle handle, Object newObject)
           
 void retractObject(FactHandle handle)
           
 void setActivation(Activation agendaItem)
           
 void setFocus(AgendaGroup focus)
           
 void setFocus(String focus)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultKnowledgeHelper

public DefaultKnowledgeHelper(WorkingMemory workingMemory)

DefaultKnowledgeHelper

public DefaultKnowledgeHelper(Activation agendaItem,
                              WorkingMemory workingMemory)
Method Detail

setActivation

public void setActivation(Activation agendaItem)

assertObject

public void assertObject(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
Parameters:
object - - the object to be asserted
Throws:
FactException - - Exceptions can be thrown by conditions which are wrapped and returned as a FactException

assertObject

public void assertObject(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
Parameters:
object - - the object to be asserted
dynamic - - specifies the object implements onPropertyChangeListener
Throws:
FactException - - Exceptions can be thrown by conditions which are wrapped and returned as a FactException

assertLogicalObject

public void assertLogicalObject(Object object)
                         throws FactException
Specified by:
assertLogicalObject in interface KnowledgeHelper
Throws:
FactException

assertLogicalObject

public void assertLogicalObject(Object object,
                                boolean dynamic)
                         throws FactException
Specified by:
assertLogicalObject in interface KnowledgeHelper
Throws:
FactException

modifyObject

public void modifyObject(FactHandle handle,
                         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 List getObjects()
Specified by:
getObjects in interface KnowledgeHelper
Returns:
- A List of the objects in the WorkingMemory

getObjects

public List getObjects(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(String group)
Specified by:
clearAgendaGroup in interface KnowledgeHelper

get

public 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(String query)
Specified by:
getQueryResults in interface KnowledgeHelper

getFocus

public AgendaGroup getFocus()
Specified by:
getFocus in interface KnowledgeHelper

setFocus

public void setFocus(String focus)
Specified by:
setFocus in interface KnowledgeHelper

setFocus

public void setFocus(AgendaGroup focus)
Specified by:
setFocus in interface KnowledgeHelper

getDeclaration

public Declaration getDeclaration(String identifier)
Specified by:
getDeclaration in interface KnowledgeHelper


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.