public interface RulesEngine
| Modifier and Type | Method and Description |
|---|---|
void |
addData(Collection<Data> data)
Add to the accumulated
Data to be processed the next time fire() is called. |
void |
addData(Data data)
Add to the accumulated
Data to be processed the next time 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 fact) |
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. |
void removeGlobal(String name)
void addFact(Object fact)
fact into the rules engine. This method is not appropriate for
Data. For Data use addData(Data).fact - the factIllegalArgumentException - If fact instanceof Data.Object getFact(Object fact)
fact - the factobject, or null if object is
not a Fact in the rules engine.void removeFact(Object fact)
fact and then deletes the fact from the rules engine.fact - the factvoid updateFact(Object fact)
fact and then updates the fact in the rules engine.fact - the factvoid addFacts(Collection facts)
fact into the rules engine. This method is not appropriate for
Data. For Data use addData(Collection).facts - the factsIllegalArgumentException - If any fact instanceof Data.void removeFacts(Collection facts)
facts and then deletes the facts from the rules engine.facts - the factsvoid removeFacts(Predicate<Object> factFilter)
facts matching the factFilter and then
deletes the facts from the rules engine.factFilter - the factFiltervoid addData(Data data)
Data to be processed the next time fire() is called. After the
rules are fired on the accumulated Data it will be cleared.data - the datavoid addData(Collection<Data> data)
Data to be processed the next time fire() is called. After the
rules are fired on the accumulated Data it will be cleared.data - the datavoid fire()
Data.void fireNoData()
Data. This is an advanced feature and used only when Facts are manually manipulated.void clear()
void reset()
Copyright © 2015 Red Hat, Inc.. All rights reserved.