public interface Rule extends HasPreceeding<Rule>, HasFollowing<Rule>
| Modifier and Type | Method and Description |
|---|---|
boolean |
activate()
Set rule state to active
|
boolean |
addCommand(RuledCommand command)
Add an
RuledCommand to fire when rule matches |
void |
clearCommands()
Remove all actions triggered by this
Rule when it matches. |
void |
execute(Object fact,
Report report)
Execute business logic, using specific
Rule implementation. |
void |
executeCommands()
call each
RuledCommand's execute() method |
List<RuledCommand> |
getCommands() |
Object |
getFact() |
String |
getName() |
Report |
getReport() |
int |
getSalience()
Rule salience is an int between -100 an 100.
|
boolean |
isActive() |
boolean |
passivate()
Set rule state to passive (will not be processed)
|
boolean |
removeCommand(RuledCommand command)
Remove an
RuledCommand to fire when rule matches |
getPreceedinggetFollowingboolean addCommand(RuledCommand command)
RuledCommand to fire when rule matchescommand - boolean removeCommand(RuledCommand command)
RuledCommand to fire when rule matchescommand - List<RuledCommand> getCommands()
RuledCommand to fire when rule matchesint getSalience()
void execute(Object fact, Report report)
Rule implementation. This
is the good place to call executeCommands().boolean isActive()
boolean activate()
boolean passivate()
void clearCommands()
Rule when it matches.String getName()
Object getFact()
IllegalStateException.Report getReport()
IllegalStateException if null.void executeCommands()
RuledCommand's execute() methodCopyright © 2012. All Rights Reserved.