public class DroolsRulesEngineImpl extends Object implements RulesEngine
| Constructor and Description |
|---|
DroolsRulesEngineImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addData(Collection<Data> data)
Add to the accumulated
Data to be processed the next time RulesEngine.fire() is called. |
void |
addData(Data data)
Add to the accumulated
Data to be processed the next time RulesEngine.fire() is called. |
void |
addFact(Object fact)
Insert the provided
fact into the rules engine. |
void |
addFacts(Collection facts)
Insert the provided
fact into the rules engine. |
void |
addGlobal(String name,
Object global) |
void |
clear()
Deletes all Facts from the rules engine.
|
void |
fire()
Fire all rules given the current set of added definitions and the currently accumulated
Data. |
void |
fireNoData()
Fire all rules given the current set of added definitions and facts.
|
Object |
getFact(Object o) |
void |
removeFact(Object fact)
Retrieves the FactHandle for
fact and then deletes the fact from the rules engine. |
void |
removeFacts(Collection facts)
Retrieves the FactHandles for
facts and then deletes the facts from the rules engine. |
void |
removeFacts(Predicate<Object> factFilter)
Retrieves the FactHandles for
facts matching the factFilter and then
deletes the facts from the rules engine. |
void |
removeGlobal(String name) |
void |
reset()
Completely reset the rules engine session.
|
void |
updateFact(Object fact)
Retrieves the FactHandle for
fact and then updates the fact in the rules engine. |
public void addFact(Object fact)
RulesEnginefact into the rules engine. This method is not appropriate for
Data. For Data use RulesEngine.addData(Data).addFact in interface RulesEnginefact - the factpublic void addFacts(Collection facts)
RulesEnginefact into the rules engine. This method is not appropriate for
Data. For Data use RulesEngine.addData(Collection).addFacts in interface RulesEnginefacts - the factspublic void addData(Data data)
RulesEngineData to be processed the next time RulesEngine.fire() is called. After the
rules are fired on the accumulated Data it will be cleared.addData in interface RulesEnginedata - the datapublic void addData(Collection<Data> data)
RulesEngineData to be processed the next time RulesEngine.fire() is called. After the
rules are fired on the accumulated Data it will be cleared.addData in interface RulesEnginedata - the datapublic void addGlobal(String name, Object global)
addGlobal in interface RulesEnginepublic void clear()
RulesEngineclear in interface RulesEnginepublic void fire()
RulesEngineData.fire in interface RulesEnginepublic void fireNoData()
RulesEngineData. This is an advanced feature and used only when Facts are manually manipulated.fireNoData in interface RulesEnginepublic Object getFact(Object o)
getFact in interface RulesEngineo - the factobject, or null if object is
not a Fact in the rules engine.public void removeFact(Object fact)
RulesEnginefact and then deletes the fact from the rules engine.removeFact in interface RulesEnginefact - the factpublic void updateFact(Object fact)
RulesEnginefact and then updates the fact in the rules engine.updateFact in interface RulesEnginefact - the factpublic void removeFacts(Collection facts)
RulesEnginefacts and then deletes the facts from the rules engine.removeFacts in interface RulesEnginefacts - the factspublic void removeFacts(Predicate<Object> factFilter)
RulesEnginefacts matching the factFilter and then
deletes the facts from the rules engine.removeFacts in interface RulesEnginefactFilter - the factFilterpublic void removeGlobal(String name)
removeGlobal in interface RulesEnginepublic void reset()
RulesEnginereset in interface RulesEngineCopyright © 2015 Red Hat, Inc.. All rights reserved.