public abstract class AbstractExecutable extends AbstractAddon implements IExecutable
IExecutable.ValueReturning
Constructor and Description |
---|
AbstractExecutable()
Empty Constructor.
|
Modifier and Type | Method and Description |
---|---|
AbstractExecutable |
clone()
Clones the Addon.
|
static IExecutionResult |
combineResults(IExecutionResult result,
IExecutionResult subresult)
Combine results' states to produce a new result.
|
void |
compile(ICompilationContext ctxt)
Logs compilation beginning, delegates real operations to
compileExecutable(ICompilationContext) and the logs ending. |
protected abstract void |
compileExecutable(ICompilationContext ctxt)
Called by
compile(ICompilationContext) to perform compilation operations. |
static void |
compileExecutables(ICompilationContext ctxt,
List<? extends IExecutable> executables)
Launched compilation process on a List of
IExecutable , if not empty or null. |
IExecutionResult |
execute(IExecutionContext ctxt)
This method handles in / out logging and redirects to
internalExecute(IExecutionContext) for specific implementation. |
static IExecutionResult |
execute(IExecutionContext ctxt,
IAddon owner,
List<? extends IExecutable> executables,
boolean stopAtFirstValidatedCondition)
Executes a list of
IExecutable . |
IExecutionResult |
execute(IExecutionContext ctxt,
List<? extends IExecutable> executables,
boolean stopAtFirstValidatedCondition)
An easy way to launch
execute(IExecutionContext, IAddon, List, boolean) with owner = this. |
Map<Object,Object> |
getProperties()
Get all properties.
|
Object |
getProperty(Object key) |
boolean |
hasProperties()
Has at least one property.
|
boolean |
hasProperty(Object key)
Contains the property identified by the provided key.
|
protected abstract IExecutionResult |
internalExecute(IExecutionContext ctxt) |
void |
removeProperty(Object key)
Removing property.
|
void |
setProperty(Object key,
Object value) |
getInternalCacheIdentifier, isCacheUsed, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, toString, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getImplementationId, getInternalCacheIdentifier, isCacheUsed, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
public final void compile(ICompilationContext ctxt) throws MRuleValidationException
compileExecutable(ICompilationContext)
and the logs ending.compile
in interface IExecutable
MRuleValidationException
- if validation problem detected.protected abstract void compileExecutable(ICompilationContext ctxt) throws MRuleValidationException
compile(ICompilationContext)
to perform compilation operations.MRuleValidationException
public IExecutionResult execute(IExecutionContext ctxt) throws MExecutionException
internalExecute(IExecutionContext)
for specific implementation.execute
in interface IExecutable
MConditionEvaluationException
MActionExecutionException
MExecutionException
protected abstract IExecutionResult internalExecute(IExecutionContext ctxt) throws MExecutionException
MExecutionException
public IExecutionResult execute(IExecutionContext ctxt, List<? extends IExecutable> executables, boolean stopAtFirstValidatedCondition) throws MExecutionException
execute(IExecutionContext, IAddon, List, boolean)
with owner = this.MExecutionException
public static IExecutionResult execute(IExecutionContext ctxt, IAddon owner, List<? extends IExecutable> executables, boolean stopAtFirstValidatedCondition) throws MExecutionException
IExecutable
.owner
- the IExecutable
requesting execution of sub-executables.executables
- the ordered list of IExecutable
to launch.ExecutionResultState.combineConditionState(ExecutionResultState)
) :
ExecutionResultState.combineActionState(ExecutionResultState)
) :
MExecutionException
public static void compileExecutables(ICompilationContext ctxt, List<? extends IExecutable> executables) throws MRuleValidationException
IExecutable
, if not empty or null.ctxt
- executables
- MRuleValidationException
public static IExecutionResult combineResults(IExecutionResult result, IExecutionResult subresult)
public AbstractExecutable clone()
IAddon
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in interface IExecutable
clone
in class AbstractAddon
public Object getProperty(Object key)
getProperty
in interface javax.rules.admin.Rule
public void setProperty(Object key, Object value)
setProperty
in interface javax.rules.admin.Rule
public void removeProperty(Object key)
IExecutable
removeProperty
in interface IExecutable
public Map<Object,Object> getProperties()
IExecutable
getProperties
in interface IExecutable
public boolean hasProperty(Object key)
IExecutable
hasProperty
in interface IExecutable
public boolean hasProperties()
IExecutable
hasProperties
in interface IExecutable