public abstract class AbstractRule extends AbstractImplementation implements RuleIF
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
loggerName |
protected ExecutableIF[] |
postMethods |
protected ExecutableIF[] |
preMethods |
protected java.lang.String |
sessionRef |
arguments, ctx, descriptor, NEW_LINE| Constructor and Description |
|---|
AbstractRule()
Create an abstract rule.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Execute the program.
|
protected void |
execute(ExecutableIF[] exec)
Execute a set of executable objects.
|
void |
executePostMethods()
Execute post methods.
|
void |
executePreMethods()
Execute pre methods.
|
AoSession |
getAoSessionFromContextWithSessionRef()
Returns the AoSession from context.
|
java.lang.String |
getId()
Get the id of the rule.
|
ODSCache |
getOdsCache(java.util.logging.Logger messenger,
java.lang.String contextReferenceName)
Retrieves the ODSCache from the moma context.
|
java.lang.String |
getPointTo()
Get the reference string of the rule.
|
java.lang.String |
getSessionRef()
Get the reference to the session.
|
java.lang.String |
getType()
Get a type identifier for the rule.
|
boolean |
isPedantic()
Get the gather mode.
|
void |
setGathermode(java.lang.String mode)
Get the gather mode.
|
void |
setId(java.lang.String id)
Set the id of the rule.
|
void |
setPointTo(java.lang.String pointTo)
Set the reference string of the rule.
|
void |
setPostMethods(ExecutableIF[] arr)
Set an rray of implementations that must be executed after rule is executed.
|
void |
setPreMethods(ExecutableIF[] arr)
Set an rray of implementations that must be executed before rule is executed.
|
void |
setSessionRef(java.lang.String sessionRef)
Set the reference to the session.
|
void |
setType(java.lang.String type)
Set a type identifier for the rule.
|
void |
terminate()
Terminate the execution.
|
java.lang.String |
toString()
Get the string presentation of the rule.
|
protected java.lang.String |
toString(ExecutableIF[] arr)
Get a string presentation of the method array.
|
java.lang.String |
toString(NameValueUnit[][] val)
Get the string presentation of the value.
|
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, init, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContext, setDescriptorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetContext, getDescriptor, init, setArguments, setContext, setDescriptorprotected java.lang.String sessionRef
protected ExecutableIF[] preMethods
protected ExecutableIF[] postMethods
protected java.lang.String loggerName
public void execute()
throws ExecutableException
execute in interface ExecutableIFExecutableExceptionpublic void terminate()
throws TerminationException
terminate in interface ExecutableIFTreminatinoExceptionTerminationException - if termination fails.public void setType(java.lang.String type)
public java.lang.String getType()
public void setId(java.lang.String id)
public java.lang.String getId()
public void setSessionRef(java.lang.String sessionRef)
setSessionRef in interface RuleIFpublic java.lang.String getSessionRef()
getSessionRef in interface RuleIFpublic AoSession getAoSessionFromContextWithSessionRef() throws RuleException
RuleExceptionpublic ODSCache getOdsCache(java.util.logging.Logger messenger, java.lang.String contextReferenceName) throws InitializationFailedException
messenger - The messenger for writing messagescontextReferenceName - Moma context reference name of the ODSCacheInitializationFailedExceptionpublic void setPointTo(java.lang.String pointTo)
setPointTo in interface RuleIFpublic java.lang.String getPointTo()
getPointTo in interface RuleIFpublic void setGathermode(java.lang.String mode)
setGathermode in interface RuleIFmode - the gather mode string.public boolean isPedantic()
isPedantic in interface RuleIFpublic void setPreMethods(ExecutableIF[] arr)
setPreMethods in interface RuleIFarr - the array of pre methods.public void setPostMethods(ExecutableIF[] arr)
setPostMethods in interface RuleIFarr - the array of post methods.public void executePreMethods()
throws ExecutableException
executePreMethods in interface RuleIFExecutableExceptionexecutePostMethods()public void executePostMethods()
throws ExecutableException
executePostMethods in interface RuleIFExecutableExceptionexecutePreMethods()protected void execute(ExecutableIF[] exec) throws ExecutableException
exec - the executablesExecutableExceptionpublic java.lang.String toString(NameValueUnit[][] val)
val - the value.public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String toString(ExecutableIF[] arr)