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
ConstructorsConstructorDescriptionAbstractCachingScriptEvaluator(PrismContext prismContext, Protector protector, LocalizationService localizationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CcompileScript(String codeString, ScriptExpressionEvaluationContext context) @Nullable ObjectevaluateInternal(@NotNull String codeString, @NotNull ScriptExpressionEvaluationContext context) Executes the evaluation.protected abstract ObjectevaluateScript(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, prepareScriptVariablesValueMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:AbstractScriptEvaluatorExecutes the evaluation. Responsible for incrementing respectiveInternalCounters.- Specified by:
evaluateInternalin 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
-