|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.sdk2.decisionpoint.DecisionPointBuilder
public class DecisionPointBuilder
Builder for creating a decision point.
Field Summary | |
---|---|
static int |
DECISION_TRACE_DEVELOPMENT |
static int |
DECISION_TRACE_OFF |
static int |
DECISION_TRACE_PRODUCTION |
Constructor Summary | |
---|---|
DecisionPointBuilder() Constructor. |
Method Summary | |
---|---|
static void |
addDataSource(java.lang.String datasrc, java.lang.String url, java.lang.String user, java.lang.String pw) setup a jndi data source for unit test |
DecisionPoint |
build() Constructs and returns a DecisionPoint instance from the values specified in this builder. |
static void |
createDecisionPointMetadata(java.lang.String fileName, java.lang.String decisionPointName, java.lang.String topViewDefName, java.util.List<java.lang.String> javaClassNames, boolean forWebService, oracle.jbo.server.DBTransactionImpl2 txn) Deprecated. |
java.lang.ClassLoader |
getClassLoader() The classloader to be used by this decision point. |
java.util.Map |
getConfig() Retrieve the config map to be used for the RuleSession. |
java.util.Calendar |
getCurrentDate() Return the current date used by this decision point |
java.lang.String |
getDecisionFunction() Return the name of the decision function to be executed in this decision point. |
int |
getDecisionTraceLevel() Retrieve the decision trace level. |
int |
getDecisionTraceLimit() Retrieve the decision trace limit. |
RuleDictionary |
getDictionary() The rule dictionary instance, when loaded by client code instead of through MDS. |
DictionaryFQN |
getDictionaryFQN() Return the fully-qualified name of the dictionary that this decision point is using. |
java.util.Calendar |
getEffectiveDate() Return the effective date used by this decision point |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() Return all properties accessible by the DecisionPointInstance |
java.lang.Object |
getProperty(java.lang.String name) Return a single property value |
boolean |
isDebug() Deprecated. |
static DecisionPointInstance |
processWebInputs(RuleSession rs, DecisionPointInputs dpinputs) Create a new DecisionPointInstance using the RuleSession and DecisionPointInputs instances passed as parameters. |
static DecisionPointInstance |
processWebInputs(RuleSession rs, SimpleDecisionPointInput dpinput) Create a new DecisionPointInstance using the RuleSession and SimpleDecisionPointInput instances passed as parameters. |
DecisionPointBuilder |
setClassLoader(java.lang.ClassLoader loader) Set the classloader to be used by this decision point. |
DecisionPointBuilder |
setConfig(java.util.Map<?,?> config) |
DecisionPointBuilder |
setCurrentDate(java.util.Calendar currentDate) Set the current date to be used by this decision point |
DecisionPointBuilder |
setDebug(boolean debug) Deprecated. |
DecisionPointBuilder |
setDecisionFunction(java.lang.String decisionFunction) Set the unqualified name of the decision function to call as part of this decision point. |
DecisionPointBuilder |
setDecisionTraceLevel(int level) Set the decision trace level. |
DecisionPointBuilder |
setDecisionTraceLimit(int limit) Set the decision trace limit. |
DecisionPointBuilder |
setDictionary(RuleDictionary dict) Sets the rule dictionary instance, when loaded by developer code instead of through MDS. |
DecisionPointBuilder |
setDictionaryFQN(DictionaryFQN fqn) This will cause the decision point to retrieve the dictionary with the indicated name from the MDS repository. |
DecisionPointBuilder |
setEffectiveDate(java.util.Calendar effectiveDate) Set the effective date to be used by this decision point |
DecisionPointBuilder |
setInitialSize(int size) Set the initial size of the rule session pool managed by the decision point. |
DecisionPointBuilder |
setProperty(java.lang.String name, java.lang.Object value) Set a single property value. |
DecisionPointBuilder |
setShouldPool(boolean shouldPool) Set the value of the pooling attribute. |
DecisionPointBuilder |
setSoftMaxSize(int size) Set the soft maximum size of the rule session pool managed by the decision point. |
boolean |
shouldPool() By default, the decision point will manage a pool of RuleSession instances. |
static DictionaryFQN |
stringToFqn(java.lang.String fqn) |
DecisionPointBuilder |
with(DictionaryFQN fqn) Fluent interface method which aliases the DecisionPointBuilder.setDictionaryFQN(oracle.rules.sdk2.repository.DictionaryFQN) method. |
DecisionPointBuilder |
with(RuleDictionary dict) Fluent interface method which aliases the DecisionPointBuilder.setDictionary(oracle.rules.sdk2.dictionary.RuleDictionary) method. |
DecisionPointBuilder |
with(java.lang.String decisionFunction) Fluent interface method which aliases the DecisionPointBuilder.setDecisionFunction(java.lang.String) method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DECISION_TRACE_OFF
public static final int DECISION_TRACE_PRODUCTION
public static final int DECISION_TRACE_DEVELOPMENT
Constructor Detail |
---|
public DecisionPointBuilder()
Method Detail |
---|
public DecisionPointBuilder with(DictionaryFQN fqn)
DecisionPointBuilder.setDictionaryFQN(oracle.rules.sdk2.repository.DictionaryFQN)
method. This will cause the decision point to retrieve the dictionary with the indicated name from the MDS repository.fqn
- the name of the dictionary to be usedpublic DecisionPointBuilder with(RuleDictionary dict)
DecisionPointBuilder.setDictionary(oracle.rules.sdk2.dictionary.RuleDictionary)
method. This will cause the decision point to use the specified dictionary.dict
- the caller-loaded dictionary to be usedpublic DecisionPointBuilder with(java.lang.String decisionFunction)
DecisionPointBuilder.setDecisionFunction(java.lang.String)
method. This will cause the decision point to use the specified decision function.decisionFunction
- the unqualified name of the decision function to callpublic DecisionPoint build() throws SDKException
SDKException
- if the builder has not been properly specifiedpublic DecisionPointBuilder setDecisionTraceLevel(int level)
level
- the decision trace level, as defined in RuleSessionpublic int getDecisionTraceLevel()
public DecisionPointBuilder setDecisionTraceLimit(int limit)
limit
- the decision trace limit, as defined in RuleSessionpublic int getDecisionTraceLimit()
public DecisionPointBuilder setConfig(java.util.Map<?,?> config)
config
- the Map instance to usepublic java.util.Map getConfig()
public boolean shouldPool()
public DecisionPointBuilder setShouldPool(boolean shouldPool)
public DecisionPointBuilder setInitialSize(int size)
public DecisionPointBuilder setSoftMaxSize(int size)
@Deprecated
public DecisionPointBuilder setDebug(boolean debug)
debug
- true to turn debug output on, false to turn it off
@Deprecated
public boolean isDebug()
public DictionaryFQN getDictionaryFQN()
public DecisionPointBuilder setDictionaryFQN(DictionaryFQN fqn)
fqn
- the name of the dictionary to be used.public DecisionPointBuilder setDictionary(RuleDictionary dict)
dict
- a reference to a RuleDictionary to be used by this DecisionPointpublic RuleDictionary getDictionary()
public DecisionPointBuilder setDecisionFunction(java.lang.String decisionFunction)
decisionFunction
- name of the decision function to callpublic java.lang.String getDecisionFunction()
public DecisionPointBuilder setClassLoader(java.lang.ClassLoader loader)
loader
- ClassLoader instance from which to load the built-in rules DecisionPointDictioanrypublic java.lang.ClassLoader getClassLoader()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.lang.Object getProperty(java.lang.String name)
name
- name of the property value to retrievepublic DecisionPointBuilder setProperty(java.lang.String name, java.lang.Object value)
name
- the name of the property to setvalue
- the value of the propertypublic java.util.Calendar getCurrentDate()
public DecisionPointBuilder setCurrentDate(java.util.Calendar currentDate)
currentDate
- set the current date of RuleSessions used by this decision pointpublic java.util.Calendar getEffectiveDate()
public DecisionPointBuilder setEffectiveDate(java.util.Calendar effectiveDate)
effectiveDate
- set the effective date of RuleSessions used by this decision point
@Deprecated
public static void createDecisionPointMetadata(java.lang.String fileName,
java.lang.String decisionPointName,
java.lang.String topViewDefName,
java.util.List<java.lang.String> javaClassNames,
boolean forWebService,
oracle.jbo.server.DBTransactionImpl2 txn)
throws SDKException
fileName
- absolute path to filedecisionPointName
- the name of the decision point to be created, which will be the name of the decision function created as well.topViewDefName
- the root View Definition of the JBO VO-Tree upon which the Decision Point's rules will be based.javaClassNames
- Java classes, either as ancillary input facts or as ActionTypesforWebService
- if true, the Decision Point will be configured for use via Decision Services as a Decision Component. If false, the D.F. will be set up for use from Java.txn
- a Transaction object to be used to retrieve locale-specific details from the View Object hierarchy. If this value is null, then only the base VO definition in the Default Locale will be used.SDKException
public static DecisionPointInstance processWebInputs(RuleSession rs, DecisionPointInputs dpinputs) throws RLException, SDKException
dpinputs
- the inputs to the decision pointRLException
SDKException
public static DecisionPointInstance processWebInputs(RuleSession rs, SimpleDecisionPointInput dpinput) throws RLException, SDKException
rs
- rule session to use with the DecisionPointInstancedpinput
- the inputs to the decision pointRLException
SDKException
public static DictionaryFQN stringToFqn(java.lang.String fqn)
public static void addDataSource(java.lang.String datasrc, java.lang.String url, java.lang.String user, java.lang.String pw) throws java.sql.SQLException, javax.naming.NamingException
datasrc
- - name of data source, e.g. jdbc/MyDataSourceurl
- - the "connect string" to the database, e.g. jdbc:orcl:thin:@localhost:1521:xeuser
- - DB user idpw
- - DB passwordjava.sql.SQLException
javax.naming.NamingException
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |