org.drools
Class MultiRepository

java.lang.Object
  |
  +--org.drools.MultiRepository
All Implemented Interfaces:
RuleBaseRepository

public class MultiRepository
extends java.lang.Object
implements RuleBaseRepository

Aggregating RuleBaseRepository that searches multiple repositories, in order.

Author:
bob mcwhirter

Constructor Summary
MultiRepository()
          Construct.
 
Method Summary
 void addRepository(RuleBaseRepository repository)
          Add a repository to the end of the search list.
 RuleBase lookupRuleBase(java.lang.String uri)
          Retrieve a RuleBase by URI.
 void registerRuleBase(java.lang.String uri, RuleBase ruleBase)
          Register a RuleBase by URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiRepository

public MultiRepository()
Construct.
Method Detail

addRepository

public void addRepository(RuleBaseRepository repository)
Add a repository to the end of the search list.
Parameters:
repository - The repository to add.

lookupRuleBase

public RuleBase lookupRuleBase(java.lang.String uri)
                        throws NoSuchRuleBaseException
Retrieve a RuleBase by URI.
Specified by:
lookupRuleBase in interface RuleBaseRepository
Parameters:
uri - The identifying URI of the RuleBase.
Returns:
The located RuleBase.
Throws:
NoSuchRuleBaseException - If no RuleBase can be located.

registerRuleBase

public void registerRuleBase(java.lang.String uri,
                             RuleBase ruleBase)
Register a RuleBase by URI.
Specified by:
registerRuleBase in interface RuleBaseRepository
Parameters:
uri - The uri.
ruleBase - The rule base.


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