|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1) E10663-02 |
||||||||
| 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.datamodel.ModelComponent
oracle.rules.sdk2.datamodel.TypedComponent
oracle.rules.sdk2.datamodel.ConstrainableComponent
oracle.rules.sdk2.datamodel.Function
public class Function
Represent a RL function In addition to the usual getters and setters for designing the function, there is also Function.isTestEnabled() and Function.test(java.lang.StringBuilder) methods for providing a "Test" button in the UI that when pressed, actually invokes the defined function in a RuleSession and returns the result for the UI to display. See details for each method.
| Nested Class Summary | |
|---|---|
static class |
Function.TestResult |
| 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 |
FORM_FREEDeprecated. |
static java.lang.String |
FORM_STRUCTUREDDeprecated. |
| Method Summary | |
|---|---|
java.util.List<Action> |
getActions() |
ActionTable |
getActionTable()Retrieve the ActionTable used to create Function body (in place of Body parameter) |
TableProperty<Action> |
getActionTableProperty()Get ActionTable Property. |
java.util.List<java.util.List<DOID>> |
getAssertedTypeIDs() |
java.lang.String |
getBody()Deprecated. |
java.lang.String[] |
getExceptions()Get all the exceptions of the function |
java.lang.String |
getForm()Deprecated. |
FormalParameterTable |
getFormalParameterTable()Get all the parameters of the function |
TableProperty<FormalParameter> |
getFormalParameterTableProperty()Get FormalParameterTable Property. |
java.lang.String[] |
getFormOptions()Deprecated. |
int |
getFormSelected()Deprecated. |
java.lang.String |
getParameterList()Get parameter list as a String |
java.util.List<? extends Parameter> |
getParameters()Get all the parameters of the callable interface (Function/Method/Constructor) Function returns FormalParameterTable and Method/Constructor return OverloadedParameterTable |
java.util.List<Pattern> |
getPatterns() |
PatternTable |
getPatternTable() |
int |
getReturnExpressionTableSize() |
boolean |
isBuiltIn()Whether the funtion is a RL built-in function or user-defined function |
boolean |
isNameDistinct()are the names in the containing DictionaryComponentTable distinct? |
boolean |
isReturnTypePrimitive()Whether the return type of the function is primitive (i.e. int, char, double etc.)? |
boolean |
isTestEnabled()Should the UI enable the "Test" button? |
void |
setBody(java.lang.String body)Deprecated. |
void |
setExceptions(java.lang.String[] exps)Set all the exceptions of the function |
void |
setForm(java.lang.String form)Deprecated. |
boolean |
test(java.lang.StringBuilder stdout)Deprecated. |
boolean |
test(java.lang.StringBuilder stdout, java.lang.ClassLoader parent)Execute this function in a new RuleSession, and return its result. |
Function.TestResult |
test(java.lang.StringBuilder stdout, java.lang.ClassLoader parent, java.lang.Integer level, java.lang.Integer limit) |
| Methods inherited from class oracle.rules.sdk2.datamodel.ConstrainableComponent |
|---|
getBucketSetAlias, getBucketSetOptions, getBucketSetProperty, setBucketSet, setBucketSetByAlias, validate |
| Methods inherited from class oracle.rules.sdk2.datamodel.TypedComponent |
|---|
getFullyQualifiedTypeName, getListContentType, getListContentTypeFullName, getListContentTypeID, getListContentTypeName, getListContentTypeOptions, getListContentTypeProperty, getType, getTypeID, getTypeName, getTypeOptions, getTypeProperty, getTypeSelected, isCollection, isPrimitiveType, setListContentType, setListContentTypeID, setListContentTypeName, setType, setTypeID, setTypeName |
| Methods inherited from class oracle.rules.sdk2.datamodel.ModelComponent |
|---|
getParent, getParentTable, getVisibleProperty, isVisible, setVisible |
| Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
|---|
clear, containsKey, containsValue, entrySet, get, getAlias, getAlias, getAliasProperty, getAllReferences, getCustom, getDependents, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getFullyQualifiedAlias, getFullyQualifiedName, getName, getNameProperty, getNext, getObjectPath, getOptions, getPrevious, getProperties, getProperty, getSelected, hasDiff, init, isAliasDistinct, isEmpty, isFullyQualifiedName, keySet, put, putAll, remove, setAlias, setCustom, setDescription, setName, size, validate, values |
| 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, getReferences, 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 oracle.rules.sdk2.datamodel.Callable |
|---|
getFullyQualifiedName, getID, getType, getTypeID |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
@Deprecated
public static final java.lang.String FORM_STRUCTURED
@Deprecated
public static final java.lang.String FORM_FREE
| Method Detail |
|---|
@Deprecated
public java.lang.String getForm()
@Deprecated
public void setForm(java.lang.String form)
@Deprecated
public java.lang.String[] getFormOptions()
@Deprecated
public int getFormSelected()
public boolean isBuiltIn()
public TableProperty<FormalParameter> getFormalParameterTableProperty()
public FormalParameterTable getFormalParameterTable()
public TableProperty<Action> getActionTableProperty()
public ActionTable getActionTable()
getActionTable in interface ParentComponentpublic java.util.List<? extends Parameter> getParameters()
CallablegetParameters in interface Callablepublic java.lang.String[] getExceptions()
public void setExceptions(java.lang.String[] exps)
exps - The list of exceptions of the function.public java.util.List<Action> getActions()
getActions in interface ParentComponentpublic java.util.List<Pattern> getPatterns()
getPatterns in interface ParentComponentpublic PatternTable getPatternTable()
getPatternTable in interface ParentComponentpublic int getReturnExpressionTableSize()
@Deprecated
public java.lang.String getBody()
@Deprecated
public void setBody(java.lang.String body)
body - A string represeting body of the functionpublic boolean isReturnTypePrimitive()
public java.lang.String getParameterList()
getParameterList in interface Callablepublic boolean isNameDistinct()
DictionaryComponentisNameDistinct in class DictionaryComponentpublic java.util.List<java.util.List<DOID>> getAssertedTypeIDs()
public boolean isTestEnabled()
Function.test(java.lang.StringBuilder)
@Deprecated
public boolean test(java.lang.StringBuilder stdout)
throws RLException,
SDKException
RLExceptionSDKException
public boolean test(java.lang.StringBuilder stdout,
java.lang.ClassLoader parent)
throws RLException,
SDKException
Function.isTestEnabled() is true. The UI should invoke test() as follows:
Function f;
StringBuilder output = new StringBuilder();
try {
boolean testPassed = f.test(output);
// display Test Passed or Test Failed
}
catch (Exception e) {
// display information about e, including stacktrace
}
// display output
stdout - the output StringBuilderRLExceptionSDKException
public Function.TestResult test(java.lang.StringBuilder stdout,
java.lang.ClassLoader parent,
java.lang.Integer level,
java.lang.Integer limit)
throws RLException,
SDKException
RLExceptionSDKException
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1) E10663-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||