Class ScriptExpressionFactory
java.lang.Object
com.evolveum.midpoint.model.common.expression.script.ScriptExpressionFactory
Creates
ScriptExpression
instances. They evaluate Groovy/JS/Python/Velocity/... scripts.
Responsibilities:
. creates ScriptExpression
instances from ScriptExpressionEvaluatorType
beans;
. manages ScriptEvaluator
instances for individual languages (Groovy, JavaScript, ...);- Author:
- Radovan Semancik
-
Constructor Summary
ConstructorDescriptionScriptExpressionFactory
(@NotNull PrismContext prismContext, @NotNull Collection<FunctionLibraryBinding> builtInLibraryBindings, @NotNull Collection<ScriptEvaluator> evaluators, @NotNull ObjectResolver objectResolver, @NotNull FunctionLibraryManager functionLibraryManager) ScriptExpressionFactory
(@NotNull Collection<FunctionLibraryBinding> builtInLibraryBindings, @NotNull ObjectResolver objectResolver) -
Method Summary
Modifier and TypeMethodDescriptioncreateScriptExpression
(@NotNull ScriptExpressionEvaluatorType scriptExpressionBean, ItemDefinition<?> outputDefinition, ExpressionProfile expressionProfile, String shortDesc, OperationResult result) @Nullable ScriptEvaluator
getEvaluatorSimple
(String languageUri) @NotNull ObjectResolver
void
registerEvaluator
(@NotNull ScriptEvaluator evaluator)
-
Constructor Details
-
ScriptExpressionFactory
public ScriptExpressionFactory(@NotNull @NotNull PrismContext prismContext, @NotNull @NotNull Collection<FunctionLibraryBinding> builtInLibraryBindings, @NotNull @NotNull Collection<ScriptEvaluator> evaluators, @NotNull @NotNull ObjectResolver objectResolver, @NotNull @NotNull FunctionLibraryManager functionLibraryManager) -
ScriptExpressionFactory
@VisibleForTesting public ScriptExpressionFactory(@NotNull @NotNull Collection<FunctionLibraryBinding> builtInLibraryBindings, @NotNull @NotNull ObjectResolver objectResolver)
-
-
Method Details
-
registerEvaluator
-
getObjectResolver
-
createScriptExpression
public ScriptExpression createScriptExpression(@NotNull @NotNull ScriptExpressionEvaluatorType scriptExpressionBean, ItemDefinition<?> outputDefinition, ExpressionProfile expressionProfile, String shortDesc, OperationResult result) throws ExpressionSyntaxException, SecurityViolationException -
getEvaluatorSimple
@VisibleForTesting @Nullable public @Nullable ScriptEvaluator getEvaluatorSimple(String languageUri)
-