public class DefaultRuleEngine extends AbstractImplementation implements RuleEngineIF
RuleEngineIF| Modifier and Type | Field and Description |
|---|---|
protected RuleIF[] |
fromRules |
protected RuleIF[] |
toRules |
arguments, ctx, descriptor, NEW_LINE| Constructor and Description |
|---|
DefaultRuleEngine() |
| Modifier and Type | Method and Description |
|---|---|
void |
attachJob(Job job)
Attach the job descriptor to the engine.
|
protected void |
driveFrom()
Drive the rules from the FROM side.
|
protected void |
driveTo()
Drive the rules from the TO side.
|
void |
execute()
Start the engine (second step).
|
protected void |
execute(Implementationseq seq)
Execute a list of executables.
|
protected int[] |
findRules(RuleIF[] arr,
java.lang.String id)
Find a set of rules having the same id.
|
protected java.lang.String |
getDrivingSide() |
void |
handleTypedRule(TypedRuleIF rule)
Handle a typed rule.
|
void |
init()
Initialize the program.
|
void |
terminate()
Terminate the engine (third step).
|
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContext, setDescriptorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContext, getDescriptor, setArguments, setContext, setDescriptorpublic void init()
throws InitializationFailedException
init in interface ImplementationIFinit in class AbstractImplementationInitializationFailedException - if the initialization fails.public void attachJob(Job job) throws InitializationFailedException
attachJob in interface RuleEngineIFjob - the job descriptor.InitializationFailedExceptionprotected java.lang.String getDrivingSide()
public void execute()
throws ExecutableException
execute in interface ExecutableIFExecutableException - if execution fails.protected void driveTo()
throws ExecutableException,
TerminationException
protected void driveFrom()
throws ExecutableException,
TerminationException
protected int[] findRules(RuleIF[] arr, java.lang.String id)
arr - an array of rules.id - the given id to be found.public void handleTypedRule(TypedRuleIF rule)
public void terminate()
throws TerminationException
terminate in interface ExecutableIFTerminationException - if termination fails.protected void execute(Implementationseq seq) throws ExecutableException
seq - The list of executablesExecutableException