|
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.rl.RuleSession
RuleSession is the public API for executing Oracle Rule Language.
Nested Class Summary | |
class |
RuleSession.ParsedRulesetInfo ParsedRulesetInfo -- a bean for holding the result of a parse |
Field Summary | |
static java.lang.String |
CFG_APP_NAME The key for setting the application (or component) name to associate this RuleSession with for DMS statistics. |
static java.lang.String |
CFG_DMS The key for setting the Boolean to enable DMS for this RuleSession. |
static java.lang.String |
CFG_LOCALE The key for setting the Locale for this RuleSession. |
static java.lang.String |
CFG_LOGGING The key for setting the Boolean to enable logging for this RuleSession. |
static java.lang.String |
CFG_SESSION_NAME The key for setting the string to use for this RuleSession. |
static java.lang.String |
RL_LOGGER |
Constructor Summary | |
RuleSession() Construct a new RuleSession, containing a Rete Engine and Working Memory. |
|
RuleSession(java.util.Map config) Construct a new RuleSession, containing a Rete Engine and Working Memory. |
Method Summary | |
void |
assertXPath(java.lang.String pkg, java.lang.Object element, java.lang.String xpath) |
java.lang.Object |
callFunction(java.lang.String functionName) Execute the RL function with no arguments, returning result. |
java.lang.Object |
callFunctionWithArgument(java.lang.String functionName, java.lang.Object arg) Execute the RL function with one argument, returning result. |
java.lang.Object |
callFunctionWithArgumentArray(java.lang.String functionName, java.lang.Object[] args) Execute the RL function with given array arguments, returning result. |
java.lang.Object |
callFunctionWithArgumentList(java.lang.String functionName, java.util.List args) Execute the RL function with given list of arguments, returning result. |
void |
executeRuleset(java.io.Reader rulesetReader) Execute the ruleset |
void |
executeRuleset(java.lang.String rulesetString) Execute the ruleset |
java.util.Iterator |
getFactIds() Get an Iterator over the fact IDs for the objects that have been asserted as facts in working memory. |
java.util.Iterator |
getFactObjects() Get an Iterator over the objects that have been asserted as facts in working memory. |
java.util.Locale |
getLocale() Get the Locale for the rule session. |
java.lang.String |
getName() Get the name associated with this rule session. |
java.io.Writer |
getOutputWriter() Get the writer used by RL println, show, and watch functions. |
java.lang.String |
getRulesetName() Get the name of the implicit ruleset for top level definitions (default is "main"). |
RuleSession.ParsedRulesetInfo |
parseRuleset(java.io.Reader rulesetReader) |
RuleSession.ParsedRulesetInfo |
parseRuleset(java.lang.String rulesetString) Parse and return info about the given ruleset. |
void |
setOutputWriter(java.io.Writer w) Set the writer used by RL println, show, and watch functions. |
void |
setRulesetName(java.lang.String n) Set the name of the implicit ruleset for top level definitions (default is "main"). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CFG_LOCALE
public static final java.lang.String CFG_SESSION_NAME
public static final java.lang.String CFG_LOGGING
public static final java.lang.String CFG_DMS
public static final java.lang.String CFG_APP_NAME
public static final java.lang.String RL_LOGGER
Constructor Detail |
public RuleSession(java.util.Map config) throws RLException
config
- session configuration parametersRLException
public RuleSession() throws RLException
RLException
Method Detail |
public java.io.Writer getOutputWriter()
public void setOutputWriter(java.io.Writer w)
w
- Writer to setpublic java.lang.String getName()
public java.lang.String getRulesetName()
public void setRulesetName(java.lang.String n)
n
- the implicit ruleset namepublic java.util.Locale getLocale()
public void executeRuleset(java.lang.String rulesetString) throws RLException
rulesetString
- String containing ruleset textRLException
public void executeRuleset(java.io.Reader rulesetReader) throws RLException
rulesetReader
- Reader containing ruleset textRLException
public java.lang.Object callFunction(java.lang.String functionName) throws RLException
functionName
- name of RL function, optionally ruleset-qualifiedRLException
public java.lang.Object callFunctionWithArgument(java.lang.String functionName, java.lang.Object arg) throws RLException
functionName
- name of RL function, optionally ruleset-qualifiedarg
- Object to pass to functionRLException
public java.lang.Object callFunctionWithArgumentArray(java.lang.String functionName, java.lang.Object[] args) throws RLException
functionName
- name of RL function, optionally ruleset-qualifiedargs
- array of arguments to pass to functionRLException
public java.lang.Object callFunctionWithArgumentList(java.lang.String functionName, java.util.List args) throws RLException
functionName
- name of RL function, optionally ruleset-qualifiedargs
- list to pass to functionRLException
public void assertXPath(java.lang.String pkg, java.lang.Object element, java.lang.String xpath) throws RLException
RLException
public RuleSession.ParsedRulesetInfo parseRuleset(java.lang.String rulesetString) throws RLException
RLException
public RuleSession.ParsedRulesetInfo parseRuleset(java.io.Reader rulesetReader) throws RLException
RLException
public java.util.Iterator getFactObjects()
Iterator
over the objects that have been asserted as facts in working memory.public java.util.Iterator getFactIds()
Iterator
over the fact IDs for the objects that have been asserted as facts in working memory. Each fact ID (an int
, is wrapped in an Integer
.
|
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 |