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
public abstract class AbstractCachingScriptEvaluator<I,C> extends AbstractScriptEvaluator
Expression evaluator that is using javax.script (JSR-223) engine.- Author:
- Radovan Semancik
-
-
Constructor Summary
Constructors Constructor Description AbstractCachingScriptEvaluator(PrismContext prismContext, Protector protector, LocalizationService localizationService)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract C
compileScript(String codeString, ScriptExpressionEvaluationContext context)
<T,V extends PrismValue>
@NotNull List<V>evaluate(ScriptExpressionEvaluationContext context)
protected abstract Object
evaluateScript(C compiledScript, ScriptExpressionEvaluationContext context)
protected ScriptCache<I,C>
getScriptCache()
-
Methods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
checkRestrictions, 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
-
-
-
-
Constructor Detail
-
AbstractCachingScriptEvaluator
public AbstractCachingScriptEvaluator(PrismContext prismContext, Protector protector, LocalizationService localizationService)
-
-
Method Detail
-
getScriptCache
protected ScriptCache<I,C> getScriptCache()
-
evaluate
@NotNull public <T,V extends PrismValue> @NotNull List<V> evaluate(ScriptExpressionEvaluationContext context) throws ExpressionEvaluationException, ObjectNotFoundException, ExpressionSyntaxException, CommunicationException, ConfigurationException, SecurityViolationException
-
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
-
-