|
Oracle Business Rules Java API Reference 10g (10.1.3.1.0) B28966-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.sdk.dictionary.RuleDictionary
This class is the top level container for a rule project. a rule dictionary contains one datamodel and one or more rulesets
Constructor Summary | |
RuleDictionary(java.lang.String name) |
Method Summary | |
java.lang.String |
dataModelRL() Generate the RL for the data model. |
void |
debugDataModelRL(java.util.Map ruleSessionConfig) Syntax check the generated RL for the data model. |
void |
debugRuleSetRL(java.lang.String ruleSetName, java.util.Map ruleSessionConfig) Syntax check the generated RL for a RuleSet. |
oracle.rules.sdk.datamodel.DataModel |
getDataModel() Get the data model in the dictionary |
java.lang.String |
getDictionaryDescription() Get description of the dictionary. |
java.util.Locale |
getLocale() Get the Locale associated with the dictionary. |
java.lang.String |
getMarker() |
java.lang.String |
getMarkerDescription() Get description of the marker. |
java.lang.String |
getName() Get the name of the dictionary |
java.lang.String[] |
getRuleSetNames() Get an Array of RuleSet Names that are currently stored in in the Dictionary (in-memory copy). |
oracle.rules.sdk.ruleset.RuleSet |
removeRuleSet(java.lang.String rulesetName) Remove a ruleset from the rule dictionary. |
java.lang.String |
ruleSetRL(java.lang.String ruleSetName) Generate the RL for the given rule set. |
void |
setDataModel(oracle.rules.sdk.datamodel.DataModel dm) Set data model. |
void |
setDictionaryDescription(java.lang.String desc) Set description to the dictionary. |
void |
setLocale(java.util.Locale locale) Associate a Locale to the dictionary |
void |
setMarkerDescription(java.lang.String desc) Set description to the marker. |
java.lang.Object |
testRuleSets(java.lang.String functionName, java.lang.String[] ruleSetName, java.io.Writer writer, java.util.Map ruleSessionConfig) Create a RuleSession with the given rule sets, then call a data model function. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RuleDictionary(java.lang.String name)
Method Detail |
public java.lang.String getName()
public oracle.rules.sdk.datamodel.DataModel getDataModel()
public void setDataModel(oracle.rules.sdk.datamodel.DataModel dm) throws RulesSDKException
dm
- the data model objectRulesSDKException
public java.lang.String dataModelRL() throws RuleSetException
RuleSession
.RuleSetException
public void debugDataModelRL(java.util.Map ruleSessionConfig) throws RuleSetException, RLException
debugRuleSetRL(java.lang.String, java.util.Map)
.ruleSessionConfig
- optional. See RuleSession
RuleSetException
- if code cannot be generated due to internal system error.RLException
- if code was incorrectly generated due to internal system error.public java.lang.String ruleSetRL(java.lang.String ruleSetName) throws RuleSetException
RuleSession
.ruleSetName
- name of the ruleSet for which to generate codeRuleSetException
public void debugRuleSetRL(java.lang.String ruleSetName, java.util.Map ruleSessionConfig) throws RuleSetException, RLException
RLException
which are of special interest are TypeCheckException, ParseException, and MultipleInheiritanceException. The following code can be used to return the line in error:
try { debugRuleSetRL ("myName") } catch (RLException e) { String[] ln = ruleSetRL ("myName").split (System.getProperty("line.separator"); String errorLine = ln [e.getLine()]; int errorColumn = e.getColumn(); }
ruleSetName
- name of the ruleSet for which to generate coderuleSessionConfig
- optional. See RuleSession
RuleSetException
- if code cannot be generated due to internal system error.RLException
- if code was incorrectly generated due to internal system error.public java.lang.Object testRuleSets(java.lang.String functionName, java.lang.String[] ruleSetName, java.io.Writer writer, java.util.Map ruleSessionConfig) throws RuleSetException, RLException
RL is generated for the rule sets and loaded into a rule session, but they are not pushed onto the stack or run. The test function should do this.
A typical test function looks like: void testFunction() { // assert test facts assert new myClass (value: 1); assert new myClass (value: 2); // pushRuleset then run it pushRuleset("myRuleSet"); run(); } The corresponding test call looks like: testRuleSets ("DM.testFunction", new String[]{"myRuleSet"}, null);
functionName
- the name of an RL function in the data model.ruleSetName
- an array of rule set names in the dictionary.writer
- optional. where to write output of println(), default System.outruleSessionConfig
- optional. See RuleSession
RuleSetException
RLException
public java.lang.String[] getRuleSetNames()
public oracle.rules.sdk.ruleset.RuleSet removeRuleSet(java.lang.String rulesetName) throws RulesSDKException
rulesetName
- name of the ruleset to be removedRulesSDKException
public java.lang.String getMarker()
public java.lang.String getDictionaryDescription()
public void setDictionaryDescription(java.lang.String desc)
desc
- description of the dictionary.public java.lang.String getMarkerDescription()
public void setMarkerDescription(java.lang.String desc)
desc
- description of the marker.public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
locale
- Locale to be associated.
|
Oracle Business Rules Java API Reference 10g (10.1.3.1.0) B28966-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |