Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


oracle.rules.sdk.editor.ruleset
Class RuleSet

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byoracle.rules.sdk.editor.ruleset.RuleComponent
              extended byoracle.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
 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, getRuleDictionary, getSelected, put, remove, restoreCopy, saveCopy, setCustom, setDescription, setRuleDictionary, 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
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

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.

Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


Copyright © 2006, Oracle. All rights reserved.