|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.7) E10663-11 |
||||||||
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)
A RuleSheet may be flagged with "order rules by bucket". In this case,
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 | |
---|---|
boolean |
canMerge(java.util.List<DimensionNode> nodes)
Test if nodes can be merged. |
boolean |
canSpan()
Test whether the rulesheet can be spanned. |
boolean |
canSpan(java.util.List<DimensionNode> nodes)
Test if any of the nodes can be spanned. |
boolean |
canUnspan()
Test whether the rulesheet can be unspanned. |
void |
compact()
Compact all rules. |
void |
compact(java.util.List<DimensionNode> nodes)
Compact the dimension nodes. |
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 |
SettableProperty<java.lang.Boolean> |
getOrderRulesByBucketProperty()
Get OrderRulesByBucket 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 |
boolean |
isOrderRulesByBucket()
whether rules in this DT are automatically ordered by bucket value |
void |
merge(boolean deep)
Deprecated. use RuleSheet.compact() |
void |
merge(java.util.List<DimensionNode> nodes)
Merge the dimension nodes. |
void |
merge(java.util.List<DimensionNode> nodes,
boolean deep)
Deprecated. use #merge(List , #compact(List , or #span(List |
void |
optimizeDimensionOrder()
Reorder Dimensions so that the DimensionNode tree has a "low" number of DimensionNodes. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Generic property setter. |
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 |
setOrderRulesByBucket(boolean flag)
set whether rules in this DT are automatically ordered by bucket value |
void |
span()
Span all contiguous dimension nodes with sameBuckets. |
void |
span(java.util.List<DimensionNode> nodes)
Span the consecutive dimension nodes with sameBuckets. |
void |
split()
Split all nodes in all Dimensions into siblings such that each node has a single bucket value. |
void |
unspan()
Unspan all dimension nodes. |
Methods inherited from class oracle.rules.sdk2.ruleset.RuleComponent |
---|
get, getParent, getParentTable, parentAction, parentActionContext, parentFunction, parentPattern, parentRule, parentRuleCommon, parentRuleSheet, parentVariable, RHSRuleVariables |
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, getRuleSet, getState, getWarnings, hashCode, isModified, validate |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, 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 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 SettableProperty<java.lang.Boolean> getOrderRulesByBucketProperty()
public boolean isOrderRulesByBucket()
public void setOrderRulesByBucket(boolean flag)
flag
- public void optimizeDimensionOrder()
public java.util.List<Gap> findGaps()
@Deprecated public void merge(boolean deep) throws SDKException
RuleSheet.compact()
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 compact()
public void span()
public boolean canSpan()
public void unspan()
public boolean canUnspan()
@Deprecated public void merge(java.util.List<DimensionNode> nodes, boolean deep)
#merge(List)
, #compact(List)
, or #span(List)
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 merge(java.util.List<DimensionNode> nodes)
nodes
- public void span(java.util.List<DimensionNode> nodes)
nodes
- public boolean canSpan(java.util.List<DimensionNode> nodes)
nodes
- public void compact(java.util.List<DimensionNode> nodes)
nodes
-
java.lang.IllegalArgumentException
- if nodes are not siblingspublic boolean canMerge(java.util.List<DimensionNode> nodes)
nodes
- 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()
public java.lang.Object put(java.lang.String key, java.lang.Object value)
DictionaryComponent
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.
put
in interface java.util.Map<java.lang.String,java.lang.Object>
put
in class RuleCommon
key
- the key of the property to setvalue
- the value of the named property to set
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.7) E10663-11 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |