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
ConstructorsConstructorDescriptionAbstractScriptEvaluator(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 ObjectevaluateInternal(@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, waitMethods 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:ScriptEvaluatorEvaluates given script in given context. Everything is wrapped intoScriptExpressionEvaluationContextobject. -
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 SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Returns simple variable map: name -> value.
-