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 Action

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

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

public class Action
extends RuleComponent

An action, such as assert, assign, call, or retract.

When using this interface, selecting the Form property first will fix the options for target, which in turn will fix the number of expressions and the option list for each. The expressions cannot be added to the table; this is done automatically when the form and target are selected.

The interface can be used to build client side scripts, server interactions or some combination of both.

     FORM               TARGET                    PARAMETERS

     FORM_ASSERT        variable              bean properties
     FORM_ASSERT_NEW    bean class            bean properties
     FORM_ASSIGN        variable              one of correct type
     FORM_CALL          function/method       parameters of correct type
     FORM_RETRACT       pattern variable      none
     FORM_RL            RL Text               none
     FORM_NESTED_TABLE  none

An Action may be executed conditionally by asociating a TestTable or an AdvancedExpression with it. The Test property of an ActionTable should not be confused with the Test property of a Rule's Pattern. A Pattern test is used to match and select FACTS in working memory. An Action Test does not refer to facts; it only contains expressions consisting of variable references and literals.

An Action can consist of a subtable of other Actions (FORM_NESTED_TABLE). This allows association of an Exception handler or if-test with a block of statements.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `FORM_ASSERT`
`static java.lang.String` | `FORM_ASSERT_NEW`
`static java.lang.String` | `FORM_ASSIGN`
`static java.lang.String` | `FORM_CALL`
`static java.lang.String` | `FORM_MAKE_CHOICE`
`static java.lang.String` | `FORM_NESTED_TABLE`
`static java.lang.String` | `FORM_RETRACT`
`static java.lang.String` | `FORM_RL`
`static java.lang.String[]` | `FORMS`
`static java.lang.String` | `PROP_EXCEPTION`
`static java.lang.String` | `PROP_EXPRESSION_TABLE`
`static java.lang.String` | `PROP_FORM`
`static java.lang.String` | `PROP_NESTED_TABLE`
`static java.lang.String` | `PROP_SIMPLE_TEST_TABLE`
`static java.lang.String` | `PROP_TARGET`
`static java.lang.String` | `PROP_TEST`
`static java.lang.String` | `PROP_TEST_EXPRESSION`
`static java.lang.String` | `TEST_ELSE`
`static java.lang.String` | `TEST_ELSE_IF`
`static java.lang.String` | `TEST_IF`
`static java.lang.String` | `TEST_NONE`
`static java.lang.String` | `TEST_WHILE`

Method Summary
`java.lang.Object` | `get(java.lang.Object key)` Generic property getter inheirited from `RuleComponent`.
`Expression` | `getExpression(int i)` Shorthand for getExpressionTable.getExpression(i)
`ExpressionTable` | `getExpressionTable()`
`java.lang.String` | `getForm()` Get What kind of action.
`java.lang.String` | `getFormConstraint()`
`java.lang.String[]` | `getFormOptions()`
`int` | `getFormSelected()`
`ActionTable` | `getNestedTable()`
`java.lang.String[]` | `getPropertyNames()`
`SimpleTestTable` | `getSimpleTestTable()`
`java.lang.String` | `getTarget()`
`java.lang.String` | `getTargetConstraint()`
`java.lang.String[]` | `getTargetOptions()`
`int` | `getTargetSelected()`
`java.lang.String` | `getTest()`
`java.lang.String` | `getTestConstraint()`
`AdvancedExpression` | `getTestExpression()`
`java.lang.String[]` | `getTestOptions()`
`int` | `getTestSelected()`
`java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)` Generic property setter.
`void` | `setForm(java.lang.String form)` Set What kind of action.
`void` | `setFormConstraint(java.lang.String formConstraint)`
`void` | `setFormOptions(java.lang.String[] formOptions)`
`void` | `setTarget(java.lang.String target)`
`void` | `setTargetConstraint(java.lang.String targetConstraint)`
`void` | `setTargetOptions(java.lang.String[] targetOptions)`
`void` | `setTest(java.lang.String test)`
`void` | `setTestConstraint(java.lang.String testConstraint)`
`void` | `setTestOptions(java.lang.String[] testOptions)`
`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, getConstraint, getConstraintList, getCustom, getDescription, getID, getOptions, getParent, getParentTable, getRange, getSelected, 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

### FORM_MAKE_CHOICE

    public static final java.lang.String FORM_MAKE_CHOICE

  See Also:
    Constant Field Values

### FORM_ASSERT

    public static final java.lang.String FORM_ASSERT

  See Also:
    Constant Field Values

### FORM_ASSERT_NEW

    public static final java.lang.String FORM_ASSERT_NEW

  See Also:
    Constant Field Values

### FORM_ASSIGN

    public static final java.lang.String FORM_ASSIGN

  See Also:
    Constant Field Values

### FORM_CALL

    public static final java.lang.String FORM_CALL

  See Also:
    Constant Field Values

### FORM_RETRACT

    public static final java.lang.String FORM_RETRACT

  See Also:
    Constant Field Values

### FORM_RL

    public static final java.lang.String FORM_RL

  See Also:
    Constant Field Values

### FORM_NESTED_TABLE

    public static final java.lang.String FORM_NESTED_TABLE

  See Also:
    Constant Field Values

### FORMS

    public static final java.lang.String[] FORMS

### TEST_NONE

    public static final java.lang.String TEST_NONE

  See Also:
    Constant Field Values

### TEST_IF

    public static final java.lang.String TEST_IF

  See Also:
    Constant Field Values

### TEST_ELSE

    public static final java.lang.String TEST_ELSE

  See Also:
    Constant Field Values

### TEST_ELSE_IF

    public static final java.lang.String TEST_ELSE_IF

  See Also:
    Constant Field Values

### TEST_WHILE

    public static final java.lang.String TEST_WHILE

  See Also:
    Constant Field Values

### PROP_FORM

    public static final java.lang.String PROP_FORM

  See Also:
    Constant Field Values

### PROP_TARGET

    public static final java.lang.String PROP_TARGET

  See Also:
    Constant Field Values

### PROP_EXPRESSION_TABLE

    public static final java.lang.String PROP_EXPRESSION_TABLE

  See Also:
    Constant Field Values

### PROP_NESTED_TABLE

    public static final java.lang.String PROP_NESTED_TABLE

  See Also:
    Constant Field Values

### PROP_EXCEPTION

    public static final java.lang.String PROP_EXCEPTION

  See Also:
    Constant Field Values

### PROP_SIMPLE_TEST_TABLE

    public static final java.lang.String PROP_SIMPLE_TEST_TABLE

  See Also:
    Constant Field Values

### PROP_TEST_EXPRESSION

    public static final java.lang.String PROP_TEST_EXPRESSION

  See Also:
    Constant Field Values

### PROP_TEST

    public static final java.lang.String PROP_TEST

  See Also:
    Constant Field Values

Method Detail

### get

    public java.lang.Object get(java.lang.Object key)

  Description copied from class: `RuleComponent`
  Generic property getter inheirited from `RuleComponent`.

  Please see the specific bean class for a list of properties.

  Specified by:
    `get` in interface `java.util.Map`
  Overrides:
    `get` in class `RuleComponent`
  Parameters:
    `key` - a String containing the property name to be fetched.
  Returns:
    the value corresponding to the key: a String, String[], RuleComponent, or RuleComponentTable

### put

    public java.lang.Object put(java.lang.Object key,
                                java.lang.Object value)

  Description copied from class: `RuleComponent`
  Generic property setter. Throws runtime exceptions for incorrect arguments. Please see the specific bean class for a list of properties, their types, and permissible values.

  A put() with either null key or null value throws a NullPointerException.

  A put() with a key that is not a String throws a ClassCastException

  A put() of a value that is not of the correct type for the key throws a ClassCastException.

  Bean properties which have no set() method are read only, and cannot be modified using the put(). Attempting to do so throws a runtime IllegalArgumentException. PROP_ID, and PROP_*_SELECTED are always read only.

  Specified by:
    `put` in interface `java.util.Map`
  Overrides:
    `put` in class `RuleComponent`
  Parameters:
    `key` - the key of the property to set
    `value` - the value of the named property to set
  Returns:
    the previous value of the property

### 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

### getExpression

    public Expression getExpression(int i)

  Shorthand for getExpressionTable.getExpression(i)
  Parameters:
    `i` - ordinal of SimpleTest to retrieve from SimpleTestTable
  Returns:
    the Expression on the left side of the SimpleTest
  Throws:
    `java.lang.IndexOutOfBoundsException`

### getPropertyNames

    public java.lang.String[] getPropertyNames()

  Overrides:
    `getPropertyNames` in class `RuleComponent`

### getForm

    public java.lang.String getForm()

  Get What kind of action. `see FORM_ above`

### setForm

    public void setForm(java.lang.String form)

  Set What kind of action. `see FORM_ above`

### getFormConstraint

    public java.lang.String getFormConstraint()

### setFormConstraint

    public void setFormConstraint(java.lang.String formConstraint)

### getFormOptions

    public java.lang.String[] getFormOptions()

### setFormOptions

    public void setFormOptions(java.lang.String[] formOptions)

### getFormSelected

    public int getFormSelected()

### getTarget

    public java.lang.String getTarget()

### setTarget

    public void setTarget(java.lang.String target)

### getTargetConstraint

    public java.lang.String getTargetConstraint()

### setTargetConstraint

    public void setTargetConstraint(java.lang.String targetConstraint)

### getTargetOptions

    public java.lang.String[] getTargetOptions()

### setTargetOptions

    public void setTargetOptions(java.lang.String[] targetOptions)

### getTargetSelected

    public int getTargetSelected()

### getExpressionTable

    public ExpressionTable getExpressionTable()

### getNestedTable

    public ActionTable getNestedTable()

### getSimpleTestTable

    public SimpleTestTable getSimpleTestTable()

### getTestExpression

    public AdvancedExpression getTestExpression()

### getTest

    public java.lang.String getTest()

### setTest

    public void setTest(java.lang.String test)

### getTestConstraint

    public java.lang.String getTestConstraint()

### setTestConstraint

    public void setTestConstraint(java.lang.String testConstraint)

### getTestOptions

    public java.lang.String[] getTestOptions()

### setTestOptions

    public void setTestOptions(java.lang.String[] testOptions)

### getTestSelected

    public int getTestSelected()

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.