Package oracle.rules.sdk2.ruleset
Class RuleSet
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,Object> VariableScope
A RuleSet has a name, a table of Rules, and a table of RuleSheets.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
DictionaryComponent.Diff<T extends DictionaryComponent>, DictionaryComponent.DiffSummary, DictionaryComponent.DiffTypeNested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,V extends Object> Nested classes/interfaces inherited from interface oracle.rules.sdk2.ruleset.VariableScope
VariableScope.ExprLocation -
Field Summary
Fields inherited from class oracle.rules.sdk2.ruleset.RuleComponent
BUILTINFields inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
PROP_ACCESS, PROP_ACTION_SELECTED, PROP_ACTION_TABLE, PROP_ACTIVE, PROP_ACTUAL_TEST_OUTPUT_TABLE, PROP_ADHOC_TEST_VALIDATION, PROP_ADVANCED_MODE, PROP_AGGREGATE, PROP_AGGREGATE_TABLE, PROP_ALIAS, PROP_ALLOW_GAPS, PROP_ALWAYS_SELECTED, PROP_ARRAY, PROP_ARRAY_COMPONENT_TYPE, PROP_ARRAY_COMPONENT_TYPE_ID, PROP_ARRAY_FACT_TYPE_TABLE, PROP_AUTO_CONFLICT_RESOLUTION, PROP_AUTO_PATTERN_PROPERTY, PROP_AUTO_SYNC, PROP_BODY, PROP_BUCKET_ID_TABLE, PROP_BUCKET_SET, PROP_BUCKET_SET_ID, PROP_BUCKET_SET_TABLE, PROP_BUCKET_TABLE, PROP_CALENDAR_FORM, PROP_CHECK_RULE_FLOW, PROP_CHILD_DIMENSION_NODES, PROP_CONFLICT, PROP_CONFLICT_POLICY, PROP_CONNECTIVE, PROP_CONSTANT, PROP_CONSTRUCTOR, PROP_CONSTRUCTOR_TABLE, PROP_CREATION_UPDATE_NUMBER, PROP_CURSOR_POSITION, PROP_CUSTOM_BINDING, PROP_DATA_MODEL, PROP_DATA_SOURCE, PROP_DECISION_FUNCTION, PROP_DECISION_FUNCTION_ID, PROP_DECISION_FUNCTION_INPUT_TABLE, PROP_DECISION_FUNCTION_OUTPUT_TABLE, PROP_DECISION_FUNCTION_RULESET_TABLE, PROP_DECISION_FUNCTION_TABLE, PROP_DECISION_MODEL, PROP_DESCRIPTION, PROP_DF_FACT, PROP_DF_FACT_ID, PROP_DICT_LOADING_EXTENSION, PROP_DICTIONARY_LINK_TABLE, PROP_DIMENSION_NODE_TABLE, PROP_DIMENSION_TABLE, PROP_DISALLOW_ERROR_SUPPRESSION, PROP_DRAFT, PROP_DSL_ID, PROP_DSL_PARAMETER_TABLE, PROP_DSL_TABLE, PROP_DSL_VALUE, PROP_DT_ACTION_NODE_TABLE, PROP_DT_ACTION_PARAMETER_NAME, PROP_DTACTION_TABLE, PROP_DTRULE_TABLE, PROP_EFFECTIVE_END_DATE, PROP_EFFECTIVE_START_DATE, PROP_ENUM, PROP_ENUM_BUCKET_SET, PROP_ENUM_BUCKET_SET_ID, PROP_ENUM_TYPE, PROP_EXCEPTION_IDS, PROP_EXCEPTIONS, PROP_EXCLUDED, PROP_EXPECTED_TEST_OUTPUT_TABLE, PROP_EXPRESSION, PROP_EXPRESSION_TABLE, PROP_FACT_PATH, PROP_FACT_PATH_IDS, PROP_FACT_TABLE, PROP_FACT_TYPE, PROP_FACT_TYPE_ID, PROP_FACT_TYPE_IDS, PROP_FACT_TYPE_TABLE, PROP_FACT_TYPES, PROP_FIELD_TABLE, PROP_FINAL, PROP_FORM, PROP_FORMAL_PARAMETER_TABLE, PROP_FUNCTION, PROP_FUNCTION_ID, PROP_FUNCTION_SIGNATURE, PROP_FUNCTION_TABLE, PROP_GENERATED_FROM, PROP_GLOBAL_ALIAS, PROP_ID, PROP_INCLUDE_CHAINED_EXPR, PROP_INCLUDED, PROP_INTERFACE, PROP_INTERFACE_IDS, PROP_INTERFACES, PROP_IS_ABSTRACT, PROP_IS_CONSTANT, PROP_IS_ENUM, PROP_IS_FINAL, PROP_IS_JAXB2, PROP_IS_PRIMARY_KEY, PROP_IS_STATIC, PROP_IS_TOPLEVEL_VIEW_OBJECT, PROP_LEFT, PROP_LIFECYCLE, PROP_LIFECYCLE_DESCRIPTION, PROP_LINK_PATH, PROP_LIST, PROP_LIST_CONTENT_TYPE, PROP_LIST_CONTENT_TYPE_ID, PROP_LOCAL, PROP_LOGICAL, PROP_METHOD_TABLE, PROP_MODIFIERS, PROP_NAME, PROP_NAMESPACE, PROP_NESTED_TABLE, PROP_NO_CONFLICT, PROP_NO_RULE_FIRED_IS_ERROR, PROP_NODE_NAME, PROP_OPERATOR, PROP_OPERATOR_ID, PROP_ORDER_RULES_BY_BUCKET, PROP_OTHERWISE, PROP_OUTPUT_TYPES, PROP_OVERLOADED_PARAMETER_TABLE, PROP_OVERRIDDEN_BY, PROP_OVERRIDE, PROP_PACKAGE, PROP_PARAM, PROP_PARAM_EXPRESSION, PROP_PARAMETER_ALIAS, PROP_PARAMETER_ID, PROP_PARAMETER_LIST, PROP_PARAMETER_NAME, PROP_PARAMETER_REQUIRED, PROP_PARAMETER_TYPE_IDS, PROP_PARAMETER_TYPES, PROP_PARENT_DIMENSION_NODE, PROP_PATTERN_TABLE, PROP_PHRASE_SUGGESTION_FORM, PROP_PREFERENCES, PROP_PREFIX_LINKED_NAMES, PROP_PRIORITY, PROP_PRIVATE_BUCKET_SET, PROP_PROPERTIES, PROP_PROPERTY, PROP_PROPERTY_ID, PROP_PROPERTY_TABLE, PROP_PROPERTY_VALUE_TABLE, PROP_QUALIFIER_PATTERN, PROP_READABLE, PROP_REF_ID, PROP_REPORT_BYUSE_NAMES, PROP_REPORT_PATTERNS, PROP_RESOLVED_TARGET, PROP_RESOLVED_VALUE, PROP_RESOURCE_BUNDLE, PROP_RESTRICT_AUTO_SUGGESTIONS, PROP_RETURN_TYPE, PROP_RIGHT, PROP_RIGHT_SEPARATOR, PROP_RULE_EXEC_ALGORITHM, PROP_RULE_FIRING_LIMIT, PROP_RULE_FIRING_LIMIT_ERROR, PROP_RULE_REPORT_TABLE, PROP_RULE_SET_TABLE, PROP_RULE_SHEET_TABLE, PROP_RULE_TABLE, PROP_RULESET, PROP_RUN_AFTER, PROP_RUN_BEFORE, PROP_SERVICE_CONFIGURATION, PROP_SERVICE_NAME, PROP_SERVICE_NAMESPACE, PROP_SHARED_BUCKET_SET, PROP_SHARED_BUCKET_SET_ID, PROP_SHOW_CONSTANTS, PROP_SHOW_FUNCTIONS, PROP_SHOW_VARIABLES, PROP_SIMPLE_TEST_TABLE, PROP_SOURCE, PROP_STATELESS, PROP_STATIC, PROP_SUPER_CLASS, PROP_SUPER_CLASS_ID, PROP_SUPPORT_XPATH, PROP_SUPPORTS_XPATH_ENABLED, PROP_SYNC_MARK, PROP_SYSTEM, PROP_TARGET, PROP_TARGET_PACKAGE, PROP_TEST_CASE_TABLE, PROP_TEST_FORM, PROP_TEST_INPUT_TABLE, PROP_TEST_MODEL, PROP_TEST_RESULT_TABLE, PROP_TEST_SUITE_TABLE, PROP_TEST_TEMPLATE_TABLE, PROP_TIMESTAMP, PROP_TOKEN_UNDER_CURSOR, PROP_TRANSLATED_ALIAS, PROP_TRANSLATED_DESCRIPTION, PROP_TRANSLATED_GLOBAL_ALIAS, PROP_TRANSLATED_PARAMETER_LIST, PROP_TRANSLATED_QUALIFIER_PATTERN, PROP_TRANSLATED_VALUE, PROP_TRANSLATED_VARIABLE, PROP_TREE, PROP_TREE_MODE, PROP_TYPE, PROP_TYPE_ID, PROP_TYPE_IDS, PROP_TYPES, PROP_UNIQUE_RULESETS, PROP_UNSAVED_TRANSLATED_ALIAS, PROP_UNSAVED_TRANSLATED_DESCRIPTION, PROP_UNSAVED_TRANSLATED_GLOBAL_ALIAS, PROP_UNSAVED_TRANSLATED_QUALIFIER_PATTERN, PROP_UNSAVED_TRANSLATED_VALUE, PROP_UPDATE_NUMBER, PROP_UPDATE_TIME, PROP_VALIDATION, PROP_VALIDATION_UPDATE_NUMBER, PROP_VALUE, PROP_VALUES, PROP_VARIABLE, PROP_VARIABLE_TABLE, PROP_VERBAL_RULE_TABLE, PROP_VERSION, PROP_VERTICAL_ORIENTATION, PROP_VISIBILITY_FILTER, PROP_VISIBILITY_FILTER_ENABLED, PROP_VISIBLE, PROP_WEB_SERVICE, PROP_WRITABLE, PROP_XML_NAME -
Method Summary
Modifier and TypeMethodDescriptionValidates then generates RL code for the rule set.Generic property getter.Get Active Property.Get All the rules in this RuleSet regardless of its type - Rule, VerbalRule or RuleSheetgetAllRules(String filterPattern, boolean translate) Get All the rules in this RuleSet filtered by the given patternGet Calendar Form (Date, Time, or DateTime).String[]Get CalendarForm Property.intintRuleSets have an immutable creation update number.Get Effective End Date.Get EffectiveEndDate Property.Get Effective Start Date.Get EffectiveStartDate Property.String[]getRule(int index) Get the Rule at the given indexgetRuleByID(DOID id) Get the Rule with the given IDgetRuleByName(String name) Get the Rule with the given nameGet the table of rule sheets (decision tables) used to access and rearrange rule sheets in the RuleSet.Get RuleSheetTable Property.Get the table of Rules used to access and rearrange Rules in the RuleSet.Get RuleTable Property.String[]getVerbalRule(int index) Get the Verbal Rule at the given indexGet the Verbal Rule with the given IDgetVerbalRuleByName(String name) Get the Verbal Rule with the given nameGet the table of Verbal Rules used to access and rearrange Verbal Rules in the RuleSet.Get VerbalRuleTable Property.inScopeVariables(boolean includeAggregates, VariableScope.ExprLocation loc) By default, pass the request to the containerbooleanisActive()Returns value of the active property.booleanDeprecated.no replacementbooleanisValid()is the rule set valid?booleanGeneric property setter.voidsetActive(boolean active) sets the active propertyvoidsetCalendarForm(String form) voidsetCustomizable(boolean flag) Deprecated.no replacementvoidsetEffectiveEndDate(String date) voidsetEffectiveStartDate(String date) voidsetVisibilityFilterEnabled(boolean flag) voidvalidate(List<SDKException> errors, List<SDKWarning> warnings) Validate and append errors and warnings.voidvalidate(List<SDKException> errors, List<SDKWarning> warnings, int modelChangeLowerBound, int ruleChangeLowerBound) Validate the RuleDictionary object.Methods inherited from class oracle.rules.sdk2.ruleset.RuleComponent
get, getParent, getParentTable, getParentVariableScope, inScopeVariables, parentAction, parentActionContext, parentAutoBindingContext, parentFunction, parentPattern, parentRule, parentRuleBase, parentRuleCommon, parentRuleSheet, parentTest, parentVariable, parentVerbalRule, RHSRuleVariables, toString, toStringMethods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
_get, _put, clear, containsKey, containsValue, entrySet, forceSync, getAEReferences, getAlias, getAlias, getAlias, getAlias, getAliasProperty, getAllReferences, getContainedDiffs, getCustom, getDependents, getDescription, getDescription, getDescriptionProperty, getDiff, getDiffMatchValue, getDiffProperties, getDiffs, getExprParserReferences, getFullyQualifiedAlias, getFullyQualifiedName, getIndex, getIndex, getName, getNameProperty, getNext, getNext, getObjectPath, getOptions, getPrevious, getPrevious, getProperties, getProperty, getReferences, getSelected, getTranslatedAlias, getTranslatedAlias, getTranslatedDescription, hasConflict, hasDiff, init, init, isAliasDistinct, isEmpty, isFullyQualifiedName, isModifiable, isNameDistinct, isSystemProperty, isUnsavedTranslatedAlias, isUnsavedTranslatedDescription, keySet, putAll, remove, removeDiff, setAlias, setAlias, setCustom, setDescription, setDescription, setName, setTranslatedAlias, setTranslatedDescription, size, validate, valuesMethods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject
_clearID, equals, exists, getAEReferenceCount, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getRuleSet, getState, getWarnings, hashCode, isModified, setID, validateMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
getRule
Get the Rule at the given index- Returns:
- the Rule
-
getRuleByID
Get the Rule with the given ID- Returns:
- the Rule
-
getRuleByName
Get the Rule with the given name- Returns:
- the Rule
-
getVerbalRule
Get the Verbal Rule at the given index- Returns:
- the VerbalRule
-
getVerbalRuleByID
Get the Verbal Rule with the given ID- Returns:
- the VerbalRule
-
getVerbalRuleByName
Get the Verbal Rule with the given name- Returns:
- the VerbalRule
-
validate
public void validate(List<SDKException> errors, List<SDKWarning> warnings, int modelChangeLowerBound, int ruleChangeLowerBound) Description copied from class:DictionaryObjectValidate the RuleDictionary object. Append error and warning exceptions. Errors will causeRuleDictionary.update(java.util.List<oracle.rules.sdk2.exception.SDKWarning>)to throw an exception. A dictionary with warnings but no errors can be persisted.- Overrides:
validatein classDictionaryObject- Parameters:
errors- a List of error exceptions to append to.warnings- a List of warning exceptions to append to.modelChangeLowerBound- smallest ModelComponent.CreationUpdateNumber modified in thix tx.ruleChangeLowerBound- smallest RuleComponent.CreationUpdateNumber modified in thix tx. Rulesets and rules with UpdateNumber >= modelChangeLowerBound will be revalidated. a value of 0 will force revalidation of all rulesets. A value of Integer.MAX_VALUE will skip validation of all rulesets.
-
validate
Description copied from class:DictionaryComponentValidate and append errors and warnings.- Overrides:
validatein classDictionaryComponent<RuleSet>- Parameters:
errors- a List of error exceptions to append to.warnings- a List of warning exceptions to append to.- See Also:
-
generateRL
Validates then generates RL code for the rule set. Used in conjunction with the code produced by (@LINK generateModelRL()).- Returns:
- A String containing the executable RL rule set
- Throws:
SDKException
-
getRuleTableProperty
Get RuleTable Property.- Returns:
- Rule TableProperty
-
getRuleTable
Get the table of Rules used to access and rearrange Rules in the RuleSet. -
getRuleSheetTableProperty
Get RuleSheetTable Property.- Returns:
- RuleSheet TableProperty
-
getRuleSheetTable
Get the table of rule sheets (decision tables) used to access and rearrange rule sheets in the RuleSet. -
getVerbalRuleTableProperty
Get VerbalRuleTable Property.- Returns:
- VerbalRule TableProperty
-
getVerbalRuleTable
Get the table of Verbal Rules used to access and rearrange Verbal Rules in the RuleSet. -
isCustomizable
Deprecated.no replacement -
setCustomizable
Deprecated.no replacement -
getActiveProperty
Get Active Property.- Returns:
- boolean SettableProperty
-
isActive
public boolean isActive()Returns value of the active property.- Returns:
- boolean
-
setActive
public void setActive(boolean active) sets the active property- Parameters:
active- boolean value
-
getEffectiveStartDateProperty
Get EffectiveStartDate Property.- Returns:
- String SettableProperty
-
getEffectiveStartDate
Get Effective Start Date.- Returns:
- String
-
setEffectiveStartDate
-
getEffectiveEndDateProperty
Get EffectiveEndDate Property.- Returns:
- String SettableProperty
-
getEffectiveEndDate
Get Effective End Date.- Returns:
- String
-
setEffectiveEndDate
-
getCalendarFormProperty
Get CalendarForm Property.- Returns:
- TranslatedProperty
-
getCalendarForm
Get Calendar Form (Date, Time, or DateTime). Default is DateTime. This applies to both the effective start date property and the the effective end date property.- Returns:
- String
-
setCalendarForm
-
getCalendarFormOptions
-
getCalendarFormSelected
public int getCalendarFormSelected() -
get
Description copied from class:DictionaryComponentGeneric property getter.Please see the specific bean class for a list of properties.
-
isValid
public boolean isValid()is the rule set valid?- Returns:
- boolean result
-
getPropertyNames
- Overrides:
getPropertyNamesin classDictionaryComponent<RuleSet>- Returns:
- Array of property names available.
-
getStoredPropertyNames
- Overrides:
getStoredPropertyNamesin classDictionaryComponent<RuleSet>- Returns:
- Array of property names which are persisted in the order in which they appear in the schema.
-
inScopeVariables
public List<ScopedVariable> inScopeVariables(boolean includeAggregates, VariableScope.ExprLocation loc) Description copied from class:RuleComponentBy default, pass the request to the container- Specified by:
inScopeVariablesin interfaceVariableScope- Overrides:
inScopeVariablesin classRuleComponent<RuleSet>
-
getVisibilityFilter
-
isVisibilityFilterEnabled
public boolean isVisibilityFilterEnabled() -
setVisibilityFilterEnabled
public void setVisibilityFilterEnabled(boolean flag) -
put
Description copied from class:DictionaryComponentGeneric 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.
-
getCreationUpdateNumber
public int getCreationUpdateNumber()RuleSets have an immutable creation update number. Decision functions with a lower validation update number cannot depend this ruleset.- Returns:
- the dictionary update number when this component was created
-
getRelevanceAndAssociationContext
-
getAllRules
Get All the rules in this RuleSet regardless of its type - Rule, VerbalRule or RuleSheet- Returns:
- consolidated list of all Rules in this RuleSet
-
getAllRules
Get All the rules in this RuleSet filtered by the given pattern- Parameters:
filterPattern- pattern for filteringtranslate- boolean value to indicate if the translated value should be used for filtering- Returns:
- consolidated list of all Rules in the RuleSet filtered by the given pattern
-