Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.rules.sdk.editor.ruleset
Class RuleSet

`java.lang.Object
java.util.AbstractMap
java.util.HashMap
oracle.rules.sdk.editor.ruleset.RuleComponent
oracle.rules.sdk.editor.ruleset.RuleSet`

All Implemented Interfaces:
  java.lang.Cloneable, java.util.Map, java.io.Serializable

public class RuleSet
extends RuleComponent

A RuleSet has a name and a table of Rules to be edited.

The RuleSet class may be used to edit an existing rule set, or to create a new one, depending on which constructor is used.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `PROP_CUSTOM_MODE`
`static java.lang.String` | `PROP_EXISTING_NAME`
`static java.lang.String` | `PROP_NAME`
`static java.lang.String` | `PROP_RULE_TABLE`

Constructor Summary
`RuleSet(RuleDictionary ruleDictionary)` Constructor used to create a new RuleSet
`RuleSet(RuleDictionary ruleDictionary, java.lang.String name)` Constructor used to edit an existing rule set

Method Summary
`boolean` | `getCustomMode()` Get custom editing mode.
`java.lang.String` | `getExistingName()`
`java.lang.String` | `getName()` Get the name of the rule set.
`java.lang.String` | `getNameConstraint()`
`java.lang.String[]` | `getNameOptions()`
`int` | `getNameSelected()`
`java.lang.String[]` | `getPropertyNames()`
`Rule` | `getRule(int index)` Get the Rule at the given index
`Rule` | `getRule(java.lang.String id)` Get the Rule with the given ID
`Rule` | `getRuleByName(java.lang.String name)` Get the Rule with the given name
`RuleDictionary` | `getRuleDictionary()` get rule dictionary object
`RuleTable` | `getRuleTable()` Get the table of rules used to access and rearrange rules in the RuleSet.
`void` | `setCustomMode(boolean customMode)` Set custom editing mode.
`void` | `setName(java.lang.String name)` Set the name of the rule set.
`void` | `setNameConstraint(java.lang.String nameConstraint)`
`void` | `setNameOptions(java.lang.String[] nameOptions)`
`void` | `update()` Validates the RuleSet then write it back to the dictionary
`void` | `updateAs(java.lang.String newName)` Validates the RuleSet then write it back to the dictionary with the new name.
`void` | `validate()` Validates the correctness of the RuleComponent and all RuleComponents below it.

Methods inherited from class oracle.rules.sdk.editor.ruleset.RuleComponent
`clear, discardCopy, get, get, getConstraint, getConstraintList, getCustom, getDescription, getID, getOptions, getParent, getParentTable, getRange, getSelected, put, remove, restoreCopy, saveCopy, setCustom, setDescription, toString`

Methods inherited from class java.util.HashMap
`clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, size, values`

Methods inherited from class java.util.AbstractMap
`equals, hashCode`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### PROP_NAME

    public static final java.lang.String PROP_NAME

  See Also:
    Constant Field Values

### PROP_EXISTING_NAME

    public static final java.lang.String PROP_EXISTING_NAME

  See Also:
    Constant Field Values

### PROP_RULE_TABLE

    public static final java.lang.String PROP_RULE_TABLE

  See Also:
    Constant Field Values

### PROP_CUSTOM_MODE

    public static final java.lang.String PROP_CUSTOM_MODE

  See Also:
    Constant Field Values

Constructor Detail

### RuleSet

    public RuleSet(RuleDictionary ruleDictionary)

  Constructor used to create a new RuleSet

### RuleSet

    public RuleSet(RuleDictionary ruleDictionary,
                   java.lang.String name)
            throws RuleEditorSDKException

  Constructor used to edit an existing rule set

Method Detail

### getRuleDictionary

    public RuleDictionary getRuleDictionary()

  get rule dictionary object

### getRule

    public Rule getRule(int index)

  Get the Rule at the given index
  Returns:
    the Rule

### getRule

    public Rule getRule(java.lang.String id)

  Get the Rule with the given ID
  Returns:
    the Rule

### getRuleByName

    public Rule getRuleByName(java.lang.String name)

  Get the Rule with the given name
  Returns:
    the Rule

### validate

    public void validate()
                  throws RuleEditorException,
                         RuleEditorSDKException

  Description copied from class: `RuleComponent`
  Validates the correctness of the RuleComponent and all RuleComponents below it.
  Overrides:
    `validate` in class `RuleComponent`
  Throws:
    `RuleEditorSDKException` - incorrect SDK usage
    `RuleEditorException` - for user input errors

### updateAs

    public void updateAs(java.lang.String newName)
                  throws RuleEditorException,
                         RuleEditorSDKException

  Validates the RuleSet then write it back to the dictionary with the new name. The new name must be unique; updateAs will fail if the name already exists. The original RuleSet will also still be in in the dictionary.
  Parameters:
    `newName` - the new name for the rule set.
  Throws:
    `RuleEditorException`
    `RuleEditorSDKException`

### update

    public void update()
                throws RuleEditorException,
                       RuleEditorSDKException

  Validates the RuleSet then write it back to the dictionary
  Throws:
    `RuleEditorException`
    `RuleEditorSDKException`

### getPropertyNames

    public java.lang.String[] getPropertyNames()

  Overrides:
    `getPropertyNames` in class `RuleComponent`

### getName

    public java.lang.String getName()

  Get the name of the rule set.

### setName

    public void setName(java.lang.String name)

  Set the name of the rule set.

### getNameConstraint

    public java.lang.String getNameConstraint()

### setNameConstraint

    public void setNameConstraint(java.lang.String nameConstraint)

### getNameOptions

    public java.lang.String[] getNameOptions()

### setNameOptions

    public void setNameOptions(java.lang.String[] nameOptions)

### getNameSelected

    public int getNameSelected()

### getExistingName

    public java.lang.String getExistingName()

### getRuleTable

    public RuleTable getRuleTable()

  Get the table of rules used to access and rearrange rules in the RuleSet.

### getCustomMode

    public boolean getCustomMode()

  Get custom editing mode. In this mode, data model list constraints are substitued for unrestricted option lists.

### setCustomMode

    public void setCustomMode(boolean customMode)

  Set custom editing mode. In this mode, data model list constraints are substitued for unrestricted option lists.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006, Oracle. All rights reserved.