Class AbstractCachingScriptEvaluator<I,C>
java.lang.Object
com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
com.evolveum.midpoint.model.common.expression.script.AbstractCachingScriptEvaluator<I,C>
- Type Parameters:
I
- script interpreter/compilerC
- compiled code
- All Implemented Interfaces:
ScriptEvaluator
- Direct Known Subclasses:
GroovyScriptEvaluator
,Jsr223ScriptEvaluator
Script evaluator that caches compiled scripts in
scriptCache
.- Author:
- Radovan Semancik
-
Constructor Summary
ConstructorDescriptionAbstractCachingScriptEvaluator
(PrismContext prismContext, Protector protector, LocalizationService localizationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract C
compileScript
(String codeString, ScriptExpressionEvaluationContext context) @Nullable Object
evaluateInternal
(@NotNull String codeString, @NotNull ScriptExpressionEvaluationContext context) Executes the evaluation.protected abstract Object
evaluateScript
(C compiledScript, ScriptExpressionEvaluationContext context) protected @NotNull ScriptCache<I,
C> Methods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
doesSupportRestrictions, evaluate, getLocalizationService, getPrismContext, getProtector, prepareScriptVariablesValueMap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.model.common.expression.script.ScriptEvaluator
getLanguageName, getLanguageUrl, isInitialized
-
Constructor Details
-
AbstractCachingScriptEvaluator
public AbstractCachingScriptEvaluator(PrismContext prismContext, Protector protector, LocalizationService localizationService)
-
-
Method Details
-
getScriptCache
-
evaluateInternal
@Nullable public @Nullable Object evaluateInternal(@NotNull @NotNull String codeString, @NotNull @NotNull ScriptExpressionEvaluationContext context) throws Exception Description copied from class:AbstractScriptEvaluator
Executes the evaluation. Responsible for incrementing respectiveInternalCounters
.- Specified by:
evaluateInternal
in classAbstractScriptEvaluator
- Throws:
Exception
-
compileScript
protected abstract C compileScript(String codeString, ScriptExpressionEvaluationContext context) throws Exception - Throws:
Exception
-
evaluateScript
protected abstract Object evaluateScript(C compiledScript, ScriptExpressionEvaluationContext context) throws Exception - Throws:
Exception
-