Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.drools.repository
Class RuleSet

    java.lang.Object
      org.drools.repository.RuleSet

    public class RuleSet

extends java.lang.Object

A ruleSet object aggregates a set of rules. This is advantageous for systems using the JBoss Rules engine where the application might make use of many related rules.

A rule set refers to rule nodes within the RulesRepository. It can either have the reference to a specific rule follow the head version of that rule, or have this reference continue to refer to a specific version of that rule even when a new version of the rule is checked into the repository

Author:
  btruitt

Constructor Summary
`RuleSet(java.lang.String name)` Constructs an object of type RuleSet with the specified name

Method Summary
`void` | `addRule(javax.jcr.Node ruleNode)` Adds a ruleNode to the ruleSet.
`void` | `addRule(javax.jcr.Node ruleNode, boolean followRuleHead)` Adds a ruleNode to the ruleSet.
`java.lang.String` | `getName()` Gets the name of this RuleSet
`java.lang.String` | `getPath()` Gets the path to the node corresponding to this ruleset within the RulesRepository.
`java.util.List` | `getRules()` Gets the list of ruleNodes in this ruleSet
`void` | `setName(java.lang.String name)` Sets the name of this RuleSet

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RuleSet

    public RuleSet(java.lang.String name)

  Constructs an object of type RuleSet with the specified name

  Parameters:
    `name` - the name for the RuleSet object

Method Detail

### getPath

    public java.lang.String getPath()

  Gets the path to the node corresponding to this ruleset within the RulesRepository. Note that the node need not exist already.

  Returns:
    the path to the corresponding node in the RulesRepository

### addRule

    public void addRule(javax.jcr.Node ruleNode)
                 throws RulesRepositoryException

  Adds a ruleNode to the ruleSet. The reference to the ruleNode will follow the head version of the specified ruleNode.

  Parameters:
    `ruleNode` - the ruleNode to add to this RuleSet
  Throws:
    `RulesRepositoryException`

### addRule

    public void addRule(javax.jcr.Node ruleNode,
                        boolean followRuleHead)
                 throws RulesRepositoryException

  Adds a ruleNode to the ruleSet. The reference to the ruleNode will optionally follow the head version of the specified ruleNode or the specific current version.

  Parameters:
    `ruleNode` - the ruleNode to add to this RuleSet
    `followRuleHead` - if true, the reference to 'ruleNode' will follow the head version of the node, even if new versions are added. If false, will refer specifically to the current version.
  Throws:
    `RulesRepositoryException`

### getRules

    public java.util.List getRules()

  Gets the list of ruleNodes in this ruleSet

  Returns:
    the List object holding the ruleNode objects in this RuleSet object

### getName

    public java.lang.String getName()

  Gets the name of this RuleSet

  Returns:
    the name of this RuleSet object

### setName

    public void setName(java.lang.String name)

  Sets the name of this RuleSet

  Parameters:
    `name` - the name to use for this RuleSet object

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Rackspace Corp. All Rights Reserved.