org.drools.reteoo
Class Builder

java.lang.Object
  extended byorg.drools.reteoo.Builder

public class Builder
extends java.lang.Object

Builds the Rete-OO network for a RuleSet.

See Also:
RuleSet
 

Constructor Summary
Builder()
          Construct a Builder against an existing Rete network.
Builder(RuleBaseContext ruleBaseContext)
          Construct a Builder against an existing Rete network.
 
Method Summary
protected  void addRule(Rule rule)
          Add a Rule to the network.
 void addRuleSet(RuleSet ruleSet)
          Add a RuleSet to the network.
 RuleBase buildRuleBase()
          Build the RuleBase.
 void setConflictResolver(ConflictResolver conflictResolver)
          Set the ConflictResolver.
 void setFactHandleFactory(FactHandleFactory factHandleFactory)
          Set the FactHandleFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Builder

public Builder()
Construct a Builder against an existing Rete network.


Builder

public Builder(RuleBaseContext ruleBaseContext)
Construct a Builder against an existing Rete network.

Method Detail

buildRuleBase

public RuleBase buildRuleBase()
Build the RuleBase.

Returns:
The rule-base.

setFactHandleFactory

public void setFactHandleFactory(FactHandleFactory factHandleFactory)
Set the FactHandleFactory.

Parameters:
factHandleFactory - The fact handle factory.

setConflictResolver

public void setConflictResolver(ConflictResolver conflictResolver)
Set the ConflictResolver.

Parameters:
conflictResolver - The conflict resolver.

addRuleSet

public void addRuleSet(RuleSet ruleSet)
                throws RuleIntegrationException,
                       RuleSetIntegrationException
Add a RuleSet to the network.

Throws:
RuleIntegrationException - if an error prevents complete construction of the network for the Rule.
RuleSetIntegrationException
Parameters:
ruleSet - The rule-set to add.

addRule

protected void addRule(Rule rule)
                throws RuleIntegrationException
Add a Rule to the network.

Throws:
RuleIntegrationException - if an error prevents complete construction of the network for the Rule.
Parameters:
rule - The rule to add.