Package org.drools.core.reteoo.builder
Class ReteooRuleBuilder
- java.lang.Object
-
- org.drools.core.reteoo.builder.ReteooRuleBuilder
-
- All Implemented Interfaces:
RuleBuilder
public class ReteooRuleBuilder extends java.lang.Object implements RuleBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected BuildUtils
utils
-
Constructor Summary
Constructors Constructor Description ReteooRuleBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntryPoint(java.lang.String id, InternalRuleBase kBase, java.util.Collection<InternalWorkingMemory> workingMemories)
java.util.List<TerminalNode>
addRule(org.drools.base.definitions.rule.impl.RuleImpl rule, InternalRuleBase kBase, java.util.Collection<InternalWorkingMemory> workingMemories)
Creates the corresponting Rete network for the givenRule
and adds it to the given rule base.WindowNode
addWindowNode(org.drools.base.rule.WindowDeclaration window, InternalRuleBase kBase, java.util.Collection<InternalWorkingMemory> workingMemories)
static TerminalNode
buildTerminalNodeForConsequence(BuildContext context, org.drools.base.rule.GroupElement subrule, int subRuleIndex, org.drools.base.rule.NamedConsequence namedConsequence, org.drools.base.time.impl.Timer timer, BuildUtils utils)
-
-
-
Field Detail
-
utils
protected BuildUtils utils
-
-
Method Detail
-
addRule
public java.util.List<TerminalNode> addRule(org.drools.base.definitions.rule.impl.RuleImpl rule, InternalRuleBase kBase, java.util.Collection<InternalWorkingMemory> workingMemories) throws org.drools.base.rule.InvalidPatternException
Creates the corresponting Rete network for the givenRule
and adds it to the given rule base.- Specified by:
addRule
in interfaceRuleBuilder
- Parameters:
rule
- The rule to add.kBase
- The rulebase to add the rule to.- Returns:
- a List
of terminal nodes for the rule - Throws:
org.drools.base.rule.InvalidPatternException
-
buildTerminalNodeForConsequence
public static TerminalNode buildTerminalNodeForConsequence(BuildContext context, org.drools.base.rule.GroupElement subrule, int subRuleIndex, org.drools.base.rule.NamedConsequence namedConsequence, org.drools.base.time.impl.Timer timer, BuildUtils utils)
-
addEntryPoint
public void addEntryPoint(java.lang.String id, InternalRuleBase kBase, java.util.Collection<InternalWorkingMemory> workingMemories)
- Specified by:
addEntryPoint
in interfaceRuleBuilder
-
addWindowNode
public WindowNode addWindowNode(org.drools.base.rule.WindowDeclaration window, InternalRuleBase kBase, java.util.Collection<InternalWorkingMemory> workingMemories)
- Specified by:
addWindowNode
in interfaceRuleBuilder
-
-