Class Jsr223ScriptEvaluator
java.lang.Object
com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
com.evolveum.midpoint.model.common.expression.script.AbstractCachingScriptEvaluator<ScriptEngine,CompiledScript>
com.evolveum.midpoint.model.common.expression.script.jsr223.Jsr223ScriptEvaluator
- All Implemented Interfaces:
ScriptEvaluator
public class Jsr223ScriptEvaluator
extends AbstractCachingScriptEvaluator<ScriptEngine,CompiledScript>
Generic expression evaluator that is using javax.script (JSR-223) engine.
This evaluator does not really support expression profiles. It has just one global almighty compiler (
ScriptEngine
).
Groovy is handled by GroovyScriptEvaluator
.- Author:
- Radovan Semancik
-
Constructor Summary
ConstructorDescriptionJsr223ScriptEvaluator
(String engineName, PrismContext prismContext, Protector protector, LocalizationService localizationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected CompiledScript
compileScript
(String codeString, ScriptExpressionEvaluationContext evaluationContext) protected Object
evaluateScript
(CompiledScript compiledScript, ScriptExpressionEvaluationContext context) Returns human readable name of the language that this evaluator supports@NotNull String
Returns (canonical) URL of the language that this evaluator can handleboolean
Can indicate that script evaluator is not initialized, e.g.Methods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractCachingScriptEvaluator
evaluateInternal, getScriptCache
Methods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
doesSupportRestrictions, evaluate, getLocalizationService, getPrismContext, getProtector, prepareScriptVariablesValueMap
-
Constructor Details
-
Jsr223ScriptEvaluator
public Jsr223ScriptEvaluator(String engineName, PrismContext prismContext, Protector protector, LocalizationService localizationService)
-
-
Method Details
-
compileScript
protected CompiledScript compileScript(String codeString, ScriptExpressionEvaluationContext evaluationContext) throws Exception - Specified by:
compileScript
in classAbstractCachingScriptEvaluator<ScriptEngine,
CompiledScript> - Throws:
Exception
-
evaluateScript
protected Object evaluateScript(CompiledScript compiledScript, ScriptExpressionEvaluationContext context) throws Exception - Specified by:
evaluateScript
in classAbstractCachingScriptEvaluator<ScriptEngine,
CompiledScript> - Throws:
Exception
-
getLanguageName
Description copied from interface:ScriptEvaluator
Returns human readable name of the language that this evaluator supports -
getLanguageUrl
Description copied from interface:ScriptEvaluator
Returns (canonical) URL of the language that this evaluator can handle -
isInitialized
public boolean isInitialized()Description copied from interface:ScriptEvaluator
Can indicate that script evaluator is not initialized, e.g. optional script evaluators (Python) or depending on the JDK platform (JavaScript/ECMAScript).
-