| |
|
| java.lang.Object com.knowgate.rules.RuleExecution
RuleExecution | abstract public class RuleExecution (Code) | | RuleExecution
RuleExecution represents an abstract operation performed on a set of data.
Rule Executions are composed of three items:
1. The Parameters Collection
2. The Assertions Collection
3. The Rule Execution Code
Also RuleExecution can used additional global properties and asserts from its parent RuleEngine.
author: Sergio Montoro Ten version: 1.0 |
RuleExecution | public RuleExecution(RuleEngine oEngine)(Code) | | Create RuleExecution on given RuleEngine
Parameters: oEngine - RuleEngine |
RuleExecution | public RuleExecution(RuleExecution oRexec)(Code) | | Create copy from another RuleExecution
Parameters: oRexec - RuleExecution |
clear | public void clear()(Code) | | Clear all parameters and asserts
|
getAssert | public boolean getAssert(String sAssertKey)(Code) | | Get status of a given fact
Parameters: sAssertKey - String A unique key in this RuleExecution for the fact boolean If no assertion with given key is found then false is returned. |
getAssertMap | public HashMap getAssertMap()(Code) | | Get map of assertions used by this RuleExecution
HashMap |
getParam | public Object getParam(String sKey)(Code) | | Get parameter value
Parameters: sKey - String Parameter Name Object If parameter is undefined then return value is null |
getParam | public Object getParam(String sKey, Object oDefault)(Code) | | Get parameter value
Parameters: sKey - String Parameter Name Parameters: oDefault - Default value Object If parameter is undefined then return value is oDefault |
getParamDate | public Date getParamDate(String sKey, Date dtDefault) throws ClassCastException(Code) | | Get parameter as java.util.Date
Parameters: sKey - String Parameter Name Parameters: dtDefault - Date Default value Date If parameter is undefined then return value is dtDefault throws: ClassCastException - |
getParamMap | public HashMap getParamMap()(Code) | | Get map of parameters used by this RuleExecution
HashMap |
getParamStr | public String getParamStr(String sKey, String sDefault)(Code) | | Get parameter as String
Parameters: sKey - String Parameter Name Parameters: sDefault - String Default value String |
getParamStr | public String getParamStr(String sKey)(Code) | | Get parameter as String
Parameters: sKey - String Parameter Name String |
getRuleEngine | public RuleEngine getRuleEngine()(Code) | | Get RuleEngine to which this RuleExecution belongs
RuleEngine |
isDefined | public boolean isDefined(String sKey)(Code) | | Find out whether or not a given parameter has a defined value
Parameters: sKey - String Parameter Name boolean |
isNull | public boolean isNull(String sKey)(Code) | | Find out whether or not a given parameter is null
Parameters: sKey - String Parameter name boolean If parameter is null or if it has not defined valuethen the return value is true, else if the parameter is defined andhas a value other than null the return value is false |
resetParam | public void resetParam(String sKey)(Code) | | Remove parameter value
Parameters: sKey - String Parameter name |
setAssert | public void setAssert(String sAssertKey, boolean bTrueOrFalse)(Code) | | Set true or false status for a fact
Parameters: sAssertKey - String A unique key in this RuleExecution for the fact Parameters: bTrueOrFalse - boolean |
setParam | public void setParam(String sKey, Object oValue)(Code) | | Set value for parameter
If parameter already exists then its value is replaced with the new one
Parameters: sKey - String Parameter name Parameters: oValue - Object |
setParams | public void setParams(Map oMap)(Code) | | Set values for a set of parameters
If parameters already exist then theirs values are replaced with the new ones
Parameters: oMap - Map of values to be set |
|
|
|