org.drools
Class RuleBase

java.lang.Object
  |
  +--org.drools.RuleBase

public class RuleBase
extends java.lang.Object

Collection of Rules.

Author:
bob mcwhirter
See Also:
Rule, RuleSet

Constructor Summary
RuleBase()
          Construct.
 
Method Summary
 void addRule(Rule rule)
          Add a Rule to this RuleBase.
 void addRuleSet(RuleSet ruleSet)
          Add a RuleSet of Rules to this RuleBase.
 TransactionalWorkingMemory createTransactionalWorkingMemory()
          Create a TransactionalWorkingMemory session for this RuleBase.
 WorkingMemory createWorkingMemory()
          Create a WorkingMemory session for this RuleBase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleBase

public RuleBase()
Construct.
Method Detail

addRuleSet

public void addRuleSet(RuleSet ruleSet)
                throws RuleIntegrationException
Add a RuleSet of Rules to this RuleBase.

A RuleSet may be added to multiple RuleBases. Any changes to a RuleSet or its component Rule once it has been added are ignored.

Parameters:
ruleSet - The RuleSet to add.
Throws:
RuleIntegrationException - If a member rule does not allow for complete and correct integration into the underlying Rete network.

addRule

public void addRule(Rule rule)
             throws RuleIntegrationException
Add a Rule to this RuleBase.

A Rule may be added to multiple RuleBases. Any changes to a Rule once it has been added are ignored.

Parameters:
rule - The rule to add.
Throws:
RuleIntegrationException - If the rule does not allow for complete and correct integration into the underlying Rete network.

createWorkingMemory

public WorkingMemory createWorkingMemory()
Create a WorkingMemory session for this RuleBase.
Returns:
A newly initialized WorkingMemory.
See Also:
WorkingMemory

createTransactionalWorkingMemory

public TransactionalWorkingMemory createTransactionalWorkingMemory()
Create a TransactionalWorkingMemory session for this RuleBase.
Returns:
A newly initialized TransactionalWorkingMemory.
See Also:
TransactionalWorkingMemory


Copyright © 2001-2003 The Werken Company. All Rights Reserved.