RulesRepository is the class that defines the behavior for the JBoss Rules (drools) rule repository based upon the JCR specification (JSR-170).
An instance of this class is capable of storing rules used by the JBoss Rule engine. It also provides a versioning capability for rules. Rules can be imported from specified files. The RulesRepository is also capable of storing DSL content. Rules can be explicitly tied to a particular DSL node within the repository, and this reference can either follow the head version, or a specific version of the DSL node.
Rules can be tagged. Tags are stored in a separate area of the repository, and can be added on demand. Rules can have 0 or more tags. Tags are intended to help provide a means for searching for specific types of rules quickly, even when they aren't all part of the same rulepackage.
Rules can be associated with 0 or 1 states. States are created in a seperate area of the repository. States are intended to help track the progress of a rule as it traverses its life- cycle. (e.g. draft, approved, deprecated, etc.)
The RulesRepository provides versioning of rules, rule packages, and DSLs. This versioning works in a strictly linear fashion, with one version having at most 1 predecessor version (or none, if it is the first version), and at most 1 successor version (or none, if it is the most recently checked-in version). The JCR specification supports a more complicated versioning system, and if there is sufficient demand, we can modify our versioning scheme to be better aligned with JCR's versioning abilities.
@author Ben Truitt - with contributions from Michael Neale and Fernando Meyer over time.