Class AbstractScriptEvaluator
java.lang.Object
com.evolveum.midpoint.model.common.expression.script.AbstractScriptEvaluator
- All Implemented Interfaces:
ScriptEvaluator
- Direct Known Subclasses:
AbstractCachingScriptEvaluator
,VelocityScriptEvaluator
Expression evaluator that is using javax.script (JSR-223) engine.
-
Constructor Summary
ConstructorDescriptionAbstractScriptEvaluator
(PrismContext prismContext, Protector protector, LocalizationService localizationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
<V extends PrismValue>
@NotNull List<V>evaluate
(@NotNull ScriptExpressionEvaluationContext context) Evaluates given script in given context.abstract @Nullable Object
evaluateInternal
(@NotNull String codeString, @NotNull ScriptExpressionEvaluationContext context) Executes the evaluation.Returns simple variable map: name -> value.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, isInitialized
-
Constructor Details
-
AbstractScriptEvaluator
public AbstractScriptEvaluator(PrismContext prismContext, Protector protector, LocalizationService localizationService)
-
-
Method Details
-
getPrismContext
-
getProtector
-
getLocalizationService
-
evaluate
@NotNull public <V extends PrismValue> @NotNull List<V> evaluate(@NotNull @NotNull ScriptExpressionEvaluationContext context) throws ExpressionEvaluationException, ObjectNotFoundException, ExpressionSyntaxException, CommunicationException, ConfigurationException, SecurityViolationException Description copied from interface:ScriptEvaluator
Evaluates given script in given context. Everything is wrapped intoScriptExpressionEvaluationContext
object. -
evaluateInternal
@Nullable public abstract @Nullable Object evaluateInternal(@NotNull @NotNull String codeString, @NotNull @NotNull ScriptExpressionEvaluationContext context) throws Exception Executes the evaluation. Responsible for incrementing respectiveInternalCounters
.- Throws:
Exception
-
doesSupportRestrictions
protected boolean doesSupportRestrictions() -
prepareScriptVariablesValueMap
protected Map<String,Object> prepareScriptVariablesValueMap(ScriptExpressionEvaluationContext context) throws ExpressionSyntaxException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Returns simple variable map: name -> value.
-