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, setDescriptor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContext, getDescriptor, init, setArguments, setContext, setDescriptor
protected java.lang.String sessionRef
protected ExecutableIF[] preMethods
protected ExecutableIF[] postMethods
protected java.lang.String loggerName
public void execute() throws ExecutableException
execute
in interface ExecutableIF
ExecutableException
public void terminate() throws TerminationException
terminate
in interface ExecutableIF
TreminatinoException
TerminationException
- 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 RuleIF
public java.lang.String getSessionRef()
getSessionRef
in interface RuleIF
public AoSession getAoSessionFromContextWithSessionRef() throws RuleException
RuleException
public 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 ODSCacheInitializationFailedException
public void setPointTo(java.lang.String pointTo)
setPointTo
in interface RuleIF
public java.lang.String getPointTo()
getPointTo
in interface RuleIF
public void setGathermode(java.lang.String mode)
setGathermode
in interface RuleIF
mode
- the gather mode string.public boolean isPedantic()
isPedantic
in interface RuleIF
public void setPreMethods(ExecutableIF[] arr)
setPreMethods
in interface RuleIF
arr
- the array of pre methods.public void setPostMethods(ExecutableIF[] arr)
setPostMethods
in interface RuleIF
arr
- the array of post methods.public void executePreMethods() throws ExecutableException
executePreMethods
in interface RuleIF
ExecutableException
executePostMethods()
public void executePostMethods() throws ExecutableException
executePostMethods
in interface RuleIF
ExecutableException
executePreMethods()
protected void execute(ExecutableIF[] exec) throws ExecutableException
exec
- the executablesExecutableException
public java.lang.String toString(NameValueUnit[][] val)
val
- the value.public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String toString(ExecutableIF[] arr)