public class ContextWrapper<C extends IContext> extends Object implements IContext
Constructor and Description |
---|
ContextWrapper(C c) |
Modifier and Type | Method and Description |
---|---|
IMRuleExecutionSet |
getExecutionSet() |
MBeanUtils.ImportHolder |
getImports()
Returns local imports for this context's ruleset.
|
Log |
getLog()
Get logger/
|
Phase |
getPhase()
Returns:
Phase.COMPILE or Phase.OPTIMIZE for ICompilationContext
Phase.EXECUTE for IExecutionContext
|
Class<?> |
getReadBaseType()
Returns base object type for property read access.
|
IContext |
getRootContext()
In case of sub context usage, this allows to access the root context.
|
<T extends IMRulesSecurityManager> |
getSecurityManager(Class<T> managerClass)
Searches in security managers the one corresponding to the provided identifying class.
|
TypedMap |
getVariables()
Returns a Map of:
variables types encountered during compilation.
|
C |
getWrappedObject() |
Class<?> |
getWriteBaseType()
Returns base object type for property write access.
|
void |
setExecutionSet(IMRuleExecutionSet executionSet) |
void |
setLoggerName(String name)
Allows to override logger name for an execution / a compilation.
|
public ContextWrapper(C c)
public IMRuleExecutionSet getExecutionSet()
getExecutionSet
in interface IContext
IContext.getExecutionSet()
public void setExecutionSet(IMRuleExecutionSet executionSet)
setExecutionSet
in interface IContext
IContext.setExecutionSet(com.massa.mrules.set.IMRuleExecutionSet)
public C getWrappedObject()
public Class<?> getReadBaseType()
IContext
getReadBaseType
in interface IContext
public Class<?> getWriteBaseType()
IContext
getWriteBaseType
in interface IContext
public TypedMap getVariables()
IContext
getVariables
in interface IContext
public void setLoggerName(String name)
IContext
ICompilationContext.DEFAULT_COMPILE_LOGGER_NAME
or ICompilationContext.DEFAULT_OPTIMIZE_LOGGER_NAME
or IExecutionContext.DEFAULT_LOGGER_NAME
.setLoggerName
in interface IContext
public IContext getRootContext()
IContext
getRootContext
in interface IContext
public MBeanUtils.ImportHolder getImports()
IContext
getImports
in interface IContext
public <T extends IMRulesSecurityManager> T getSecurityManager(Class<T> managerClass) throws MRulesSecurityException
IContext
getSecurityManager
in interface IContext
MRulesSecurityException