@PersistantProperty(property="stopAtFirstValidatedCondition",defaultValue="true") @PersistantProperty(property="importedClasses",alias="importedClass") @PersistantProperty(property="importedPackages",alias="importedPackage") @PersistantProperty(property="callables",alias="callable") @PersistantProperty(property="executables",alias="executable") public class MRuleExecutionSet extends AbstractMRuleExecutionSet implements ICallableRepository, IExecutable.ValueReturning
IExecutable.ValueReturning
Modifier and Type | Field and Description |
---|---|
static String |
RULEEXECUTIONSET_ID |
Constructor and Description |
---|
MRuleExecutionSet()
Default constructor.
|
MRuleExecutionSet(List<? extends IExecutable> executables)
stopAtFirstValidatedCondition defaults to true
|
MRuleExecutionSet(List<? extends IExecutable> executables,
boolean stopAtFirstValidatedCondition) |
Modifier and Type | Method and Description |
---|---|
IExecutionResult |
call(String name,
IExecutionContext ctxt)
Requests call to the
ICallable identified by its name inside the repository. |
MRuleExecutionSet |
clone()
Clones the IExecutable.
|
protected void |
compileRuleSet(ICompilationContext ctxt)
Performs specific compilation actions, including addon registering in context.
|
boolean |
equals(Object o) |
IExecutionResult |
executeRuleSet(IExecutionContext ctxt)
Performs implementation specific execution actions.
|
MBeanUtils.ImportHolder |
generateImports()
Generates "on the fly" the imports, ignoring data produced by the compilation phase.
|
List<? extends ICallable> |
getCallables() |
CostInfo |
getEstimatedReadCost(ICompilationContext ctxt)
This kind of executable should provide a cost estimation in order to be used as accessor
and be optimized effectively.
|
CostInfo |
getEstimatedReadCost(String name,
ICompilationContext ctxt)
Computes an estimated cost of the whole callable execution, in order to be able to
optimize accurately.
|
List<? extends IExecutable> |
getExecutables() |
String |
getImplementationId()
Unique addon implementation ID.
|
List<LocalImportHolder> |
getImportedClasses() |
List<LocalImportHolder> |
getImportedPackages() |
MBeanUtils.ImportHolder |
getImports()
Returns local imports for this ruleset.
|
List<? extends IExecutable> |
getRules()
Synonym for
getExecutables() |
int |
hashCode() |
boolean |
isCompiled()
Tells whether the mandatory compilation step has been executed or not.
|
boolean |
isStopAtFirstValidatedCondition() |
protected void |
optimizeRuleSet(ICompilationContext ctxt)
Performs specific optimization actions, including launching the optimization chain.
|
void |
setCallables(List<? extends ICallable> callables) |
void |
setExecutables(List<? extends IExecutable> executables) |
void |
setImportedClasses(List<LocalImportHolder> importedClasses) |
void |
setImportedPackages(List<LocalImportHolder> importedPackages) |
void |
setStopAtFirstValidatedCondition(boolean stopAtFirstValidatedCondition) |
String |
toString() |
void |
toString(OuterWithLevel outer)
Method used to send String representation of the current object to the
OuterWithLevel . |
boolean |
validate(String name)
Validates that the named
ICallable exists in this repository. |
compile, debugEntering, debugExiting, execute, getContextFactory, getDebugInfo, getDefaultObjectFilter, getDefaultObjectFilterInstance, getDescription, getInternalCacheIdentifier, getInternalDistinctAddonCacheCount, getMetadata, getName, getProperties, getProperty, getUri, hasProperties, hasProperty, isCacheEnabled, isCacheUsed, isInternalCacheIdentifierNeeded, optimize, removeProperty, resetCachedData, setCacheEnabled, setContextFactory, setDebugInfo, setDefaultObjectFilter, setDescription, setInternalCacheIdentifier, setName, setProperty, setUri, wasRegistered
finalize, getClass, notify, notifyAll, wait, wait, wait
compile, execute, getProperties, hasProperties, hasProperty, removeProperty
getInternalCacheIdentifier, isCacheUsed, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
public static final String RULEEXECUTIONSET_ID
public MRuleExecutionSet()
public MRuleExecutionSet(List<? extends IExecutable> executables)
public MRuleExecutionSet(List<? extends IExecutable> executables, boolean stopAtFirstValidatedCondition)
protected void compileRuleSet(ICompilationContext ctxt) throws MRuleValidationException
AbstractMRuleExecutionSet
compileRuleSet
in class AbstractMRuleExecutionSet
MRuleValidationException
public CostInfo getEstimatedReadCost(ICompilationContext ctxt) throws MRuleValidationException
IExecutable.ValueReturning
getEstimatedReadCost
in interface IExecutable.ValueReturning
MRuleValidationException
protected void optimizeRuleSet(ICompilationContext ctxt) throws MRuleValidationException
AbstractMRuleExecutionSet
optimizeRuleSet
in class AbstractMRuleExecutionSet
MRuleValidationException
public IExecutionResult executeRuleSet(IExecutionContext ctxt) throws MExecutionException
AbstractMRuleExecutionSet
executeRuleSet
in class AbstractMRuleExecutionSet
ExecutionResultState.combineConditionState(ExecutionResultState)
) :
ExecutionResultState.combineActionState(ExecutionResultState)
) :
MExecutionException
public boolean validate(String name)
ICallableRepository
ICallable
exists in this repository.validate
in interface ICallableRepository
name
- Name of the ICallable
to validatepublic CostInfo getEstimatedReadCost(String name, ICompilationContext ctxt) throws MRuleValidationException
ICallableRepository
getEstimatedReadCost
in interface ICallableRepository
ctxt
- Compilation context.MRuleValidationException
public IExecutionResult call(String name, IExecutionContext ctxt) throws MExecutionException
ICallableRepository
ICallable
identified by its name inside the repository.call
in interface ICallableRepository
name
- Name of the ICallable
to callctxt
- Execution contextMExecutionException
public boolean isCompiled()
IMRuleExecutionSet
isCompiled
in interface IMRuleExecutionSet
public List<? extends IExecutable> getRules()
getExecutables()
getRules
in interface javax.rules.admin.RuleExecutionSet
public MBeanUtils.ImportHolder getImports()
IMRuleExecutionSet
getImports
in interface IMRuleExecutionSet
public MBeanUtils.ImportHolder generateImports()
IMRuleExecutionSet
generateImports
in interface IMRuleExecutionSet
public List<? extends IExecutable> getExecutables()
public void setExecutables(List<? extends IExecutable> executables)
public List<LocalImportHolder> getImportedClasses()
public void setImportedClasses(List<LocalImportHolder> importedClasses)
public List<LocalImportHolder> getImportedPackages()
public void setImportedPackages(List<LocalImportHolder> importedPackages)
public boolean isStopAtFirstValidatedCondition()
public void setStopAtFirstValidatedCondition(boolean stopAtFirstValidatedCondition)
public void toString(OuterWithLevel outer) throws IOException
Outable
OuterWithLevel
.toString
in interface Outable
IOException
public MRuleExecutionSet clone()
IExecutable
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in interface IExecutable
clone
in interface IMRuleExecutionSet
clone
in class AbstractMRuleExecutionSet
public String getImplementationId()
IAddon
getImplementationId
in interface IAddon