Class MelScriptEvaluator
java.lang.Object
com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
com.evolveum.midpoint.model.common.expression.script.AbstractCachingScriptEvaluator<dev.cel.runtime.CelRuntime,dev.cel.common.CelAbstractSyntaxTree,CelScriptCacheKey>
com.evolveum.midpoint.model.common.expression.script.mel.MelScriptEvaluator
- All Implemented Interfaces:
ScriptEvaluator
public class MelScriptEvaluator
extends AbstractCachingScriptEvaluator<dev.cel.runtime.CelRuntime,dev.cel.common.CelAbstractSyntaxTree,CelScriptCacheKey>
Expression evaluator that is using MidPoint Expression Language (MEL).
MidPoint Expression Language (MEL) is based on Common Expression Language (CEL),
extended with midPoint-specific functionality.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMelScriptEvaluator(PrismContext prismContext, Protector protector, LocalizationService localizationService, BasicExpressionFunctions basicExpressionFunctions, MidpointFunctions midpointExpressionFunctions) Called by Spring but also by lower-level tests -
Method Summary
Modifier and TypeMethodDescriptionprotected dev.cel.common.CelAbstractSyntaxTreecompileScript(String codeString, ScriptExpressionEvaluationContext context) protected dev.cel.runtime.CelRuntimeprotected booleanprotected ObjectevaluateScript(dev.cel.common.CelAbstractSyntaxTree compiledScript, ScriptExpressionEvaluationContext context) Returns human readable name of the language that this evaluator supports@NotNull StringReturns (canonical) URL of the language that this evaluator can handleprotected CelScriptCacheKeygetScriptCachingKey(String codeString, ScriptExpressionEvaluationContext context) protected booleanprotected booleanMethods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractCachingScriptEvaluator
evaluateInternal, getInterpreter, getScriptCacheMethods inherited from class com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
evaluate, getLocalizationService, getPrismContext, getProtector, prepareFunctionLibraryMap, prepareScriptVariablesMap, prepareScriptVariablesTypedValueMap, prepareUnifiedScriptVariablesValueMapMethods 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
isInitialized
-
Field Details
-
LANGUAGE_NAME
- See Also:
-
LANGUAGE_URL
- See Also:
-
-
Constructor Details
-
MelScriptEvaluator
public MelScriptEvaluator(PrismContext prismContext, Protector protector, LocalizationService localizationService, BasicExpressionFunctions basicExpressionFunctions, MidpointFunctions midpointExpressionFunctions) Called by Spring but also by lower-level tests
-
-
Method Details
-
getLanguageName
Description copied from interface:ScriptEvaluatorReturns human readable name of the language that this evaluator supports -
getLanguageUrl
Description copied from interface:ScriptEvaluatorReturns (canonical) URL of the language that this evaluator can handle -
doesSupportRestrictions
protected boolean doesSupportRestrictions()- Overrides:
doesSupportRestrictionsin classAbstractScriptEvaluator
-
needsServiceVariables
protected boolean needsServiceVariables()- Overrides:
needsServiceVariablesin classAbstractScriptEvaluator
-
supportsDeprecatedVariables
protected boolean supportsDeprecatedVariables()- Overrides:
supportsDeprecatedVariablesin classAbstractScriptEvaluator
-
compileScript
protected dev.cel.common.CelAbstractSyntaxTree compileScript(String codeString, ScriptExpressionEvaluationContext context) throws ExpressionEvaluationException, SecurityViolationException - Specified by:
compileScriptin classAbstractCachingScriptEvaluator<dev.cel.runtime.CelRuntime,dev.cel.common.CelAbstractSyntaxTree, CelScriptCacheKey> - Throws:
ExpressionEvaluationExceptionSecurityViolationException
-
getScriptCachingKey
protected CelScriptCacheKey getScriptCachingKey(String codeString, ScriptExpressionEvaluationContext context) throws SchemaException, ExpressionEvaluationException, CommunicationException, SecurityViolationException, ConfigurationException, ObjectNotFoundException - Specified by:
getScriptCachingKeyin classAbstractCachingScriptEvaluator<dev.cel.runtime.CelRuntime,dev.cel.common.CelAbstractSyntaxTree, CelScriptCacheKey> - Throws:
SchemaExceptionExpressionEvaluationExceptionCommunicationExceptionSecurityViolationExceptionConfigurationExceptionObjectNotFoundException
-
evaluateScript
protected Object evaluateScript(dev.cel.common.CelAbstractSyntaxTree compiledScript, ScriptExpressionEvaluationContext context) throws Exception - Specified by:
evaluateScriptin classAbstractCachingScriptEvaluator<dev.cel.runtime.CelRuntime,dev.cel.common.CelAbstractSyntaxTree, CelScriptCacheKey> - Throws:
Exception
-
createInterpreter
protected dev.cel.runtime.CelRuntime createInterpreter(ScriptExpressionEvaluationContext context) throws ConfigurationException - Specified by:
createInterpreterin classAbstractCachingScriptEvaluator<dev.cel.runtime.CelRuntime,dev.cel.common.CelAbstractSyntaxTree, CelScriptCacheKey> - Throws:
ConfigurationException
-