|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1) E10663-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.sdk2.dictionary.DictionaryObject
oracle.rules.sdk2.dictionary.DictionaryComponent
oracle.rules.sdk2.ruleset.RuleComponent
oracle.rules.sdk2.ruleset.RuleCommon
oracle.rules.sdk2.decisiontable.RuleSheet
public class RuleSheet
A RuleSheet represents a decision table. A RuleSheet provides model support for authoring a set of related rules. The rules share a common PatternTable, Dimensions, and DTActions. The PatternTable selects the fact type(s) for the decision table. Dimensions are the common part of rule conditions shared by all rules, typically a fact property such as "age". Each rule references a DimensionNode that contains one or more Buckets drawn from a Bucketset associated with the Dimension. The bucket value is combined with the Dimension to generate a rule condition, such as "age < 25". DTActions are the common part of actions, and may be parameterized.
Dimensions and DTActions can be reordered within the RuleSheet using DictionaryComponentTable.move(int,int,boolean)
DTRules cannot be explicitly reordered. DTRules are ordered by the position of the DimensionNode Buckets in the containing Bucketset.
RuleSheet provides boolean properties to allow/disallow gaps and to automatically resolve conflicts by overriding subsuming rules. There is also a method to check for gaps RuleSheet.findGaps()
A base priority can be defined so that all rules in the sheet will have priority greater than or equal to the base.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
DictionaryComponent.Diff, DictionaryComponent.DiffType |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static java.lang.String |
CONFLICT_AUTO_OVERRIDE |
static java.lang.String |
CONFLICT_IGNORE |
static java.lang.String |
CONFLICT_MANUAL |
Method Summary | |
---|---|
java.util.List<Gap> |
findGaps() Find the Gaps (missing rules) in the decision table |
java.util.List<Action> |
getActions() |
ActionTable |
getActionTable() |
SettableProperty<java.lang.Boolean> |
getAllowGapsProperty() Get AllowGaps Property. |
TranslatedProperty |
getConflictPolicyProperty() Get Conflict Policy Property. |
DimensionTable |
getDimensionTable() Get DimensionTable |
TableProperty<Dimension> |
getDimensionTableProperty() Get DimensionTable Property |
DTActionTable |
getDTActionTable() Get DTActionTable |
TableProperty<DTAction> |
getDTActionTableProperty() Get DTActionTable Property |
DTRuleTable |
getDTRuleTable() Get DTRuleTable |
TableProperty<DTRule> |
getDTRuleTableProperty() Get DTRuleTable Property |
boolean |
hasConflict() whether the decision table has any unresolved conflicts |
boolean |
hasNoConflict() whether the decision table has any conflicts resolved as "no conflict" |
boolean |
hasOverride() whether the decision table has any conflicts resolved as override |
boolean |
hasRunBefore() whether the decision table has any conflicts resolved as "run before" |
boolean |
isAllowGaps() Are gaps allowed during validation? |
boolean |
isAutoConflictResolution() Deprecated. use RuleSheet.getConflictPolicyProperty() and test if the value is RuleSheet.CONFLICT_AUTO_OVERRIDE |
void |
merge(boolean deep) Merge all rules. |
void |
merge(java.util.List<DimensionNode> nodes, boolean deep) merge the rules containing the listed nodes (which must be siblings). |
void |
optimizeDimensionOrder() Reorder Dimensions so that the DimensionNode tree has a "low" number of DimensionNodes. |
boolean |
removeActionlessRules() Remove rules with no actions selected |
boolean |
removeActionlessRules(int minRuleIndex, int maxRuleIndex) Remove rules with index between minRuleIndex and maxRuleIndex inclusive with no actions selected |
void |
setAllowGaps(boolean flag) set whether gaps are allowed during validation |
void |
setAutoConflictResolution(boolean flag) Deprecated. use RuleSheet.getConflictPolicyProperty() and set the value to RuleSheet.CONFLICT_AUTO_OVERRIDE or RuleSheet.CONFLICT_MANUAL |
void |
split() Split all nodes in all Dimensions into siblings such that each node has a single bucket value. |
Methods inherited from class oracle.rules.sdk2.ruleset.RuleComponent |
---|
get, getParent, getParentTable, parentAction, parentComponent, parentFunction, parentPattern, parentRule, parentRuleCommon, parentRuleSheet, parentVariable, RHSRuleVariables |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
clear, containsKey, containsValue, entrySet, get, getAlias, getAlias, getAliasProperty, getAllReferences, getCustom, getDependents, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getFullyQualifiedAlias, getFullyQualifiedName, getName, getNameProperty, getNext, getObjectPath, getOptions, getPrevious, getProperties, getProperty, getSelected, hasDiff, init, isAliasDistinct, isEmpty, isFullyQualifiedName, isNameDistinct, keySet, put, putAll, remove, setAlias, setCustom, setDescription, setName, size, validate, validate, values |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject |
---|
equals, exists, getAEReferences, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getLevel, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getReferences, getRuleSet, getState, getWarnings, hashCode, isModified, validate |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final java.lang.String CONFLICT_MANUAL
public static final java.lang.String CONFLICT_AUTO_OVERRIDE
public static final java.lang.String CONFLICT_IGNORE
Method Detail |
---|
public java.util.List<Action> getActions()
getActions
in interface ParentComponent
getActions
in class RuleCommon
public TableProperty<Dimension> getDimensionTableProperty()
public DimensionTable getDimensionTable()
public TableProperty<DTAction> getDTActionTableProperty()
public DTActionTable getDTActionTable()
public ActionTable getActionTable()
public TableProperty<DTRule> getDTRuleTableProperty()
public DTRuleTable getDTRuleTable()
public void optimizeDimensionOrder()
public java.util.List<Gap> findGaps()
public void merge(boolean deep) throws SDKException
Dimension.merge()
. To merge all rules that share a DimensionNode (with choice of whether to merge actions), use DimensionNode.merge(boolean)
. To merge two sibling DimensionNodes into one with combined buckets, use DimensionNode.merge(DimensionNode)
.deep
- if false then a single rule will remain after the merge. If true then rules with identical action nodes will be merged. If there are no actions, then the deep flag is irrelevent.SDKException
public void merge(java.util.List<DimensionNode> nodes, boolean deep)
nodes
- siblings to mergedeep
- whether to merge descendants of listed nodes that lead to the same actions or just merge the nodes but not their descendants. When not deep, different actions may be merged into an invalid DTActionNode.RuleSheet.merge(boolean)
public void split() throws SDKException
SDKException
public boolean removeActionlessRules()
public boolean removeActionlessRules(int minRuleIndex, int maxRuleIndex)
public SettableProperty<java.lang.Boolean> getAllowGapsProperty()
public boolean isAllowGaps()
public void setAllowGaps(boolean flag)
flag
-public TranslatedProperty getConflictPolicyProperty()
@Deprecated
public boolean isAutoConflictResolution()
RuleSheet.getConflictPolicyProperty()
and test if the value is RuleSheet.CONFLICT_AUTO_OVERRIDE
@Deprecated
public void setAutoConflictResolution(boolean flag)
RuleSheet.getConflictPolicyProperty()
and set the value to RuleSheet.CONFLICT_AUTO_OVERRIDE
or RuleSheet.CONFLICT_MANUAL
flag
-RuleSheet.isAutoConflictResolution()
public boolean hasNoConflict()
public boolean hasOverride()
public boolean hasRunBefore()
public boolean hasConflict()
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1) E10663-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |