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>
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).
- Author:
- Radovan Semancik
-
-
Constructor Summary
Constructors Constructor Description Jsr223ScriptEvaluator(String engineName, PrismContext prismContext, Protector protector, LocalizationService localizationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CompiledScript
compileScript(String codeString, ScriptExpressionEvaluationContext evaluationContext)
protected Object
evaluateScript(CompiledScript compiledScript, ScriptExpressionEvaluationContext context)
String
getLanguageName()
Returns human readable name of the language that this evaluator supportsString
getLanguageUrl()
Returns URL of the language that this evaluator can handleboolean
isInitialized()
Can indicate that script evaluator is not initialized, e.g.-
Methods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractCachingScriptEvaluator
evaluate, getScriptCache
-
Methods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
checkRestrictions, getLocalizationService, getPrismContext, getProtector, prepareScriptVariablesValueMap
-
-
-
-
Constructor Detail
-
Jsr223ScriptEvaluator
public Jsr223ScriptEvaluator(String engineName, PrismContext prismContext, Protector protector, LocalizationService localizationService)
-
-
Method Detail
-
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
public String getLanguageName()
Description copied from interface:ScriptEvaluator
Returns human readable name of the language that this evaluator supports
-
getLanguageUrl
public String getLanguageUrl()
Description copied from interface:ScriptEvaluator
Returns 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).
-
-