Class ScriptExpressionEvaluator<V extends PrismValue,D extends ItemDefinition<?>>
java.lang.Object
com.evolveum.midpoint.repo.common.expression.evaluator.AbstractExpressionEvaluator<V,D,E>
com.evolveum.midpoint.model.common.expression.evaluator.transformation.AbstractValueTransformationExpressionEvaluator<V,D,ScriptExpressionEvaluatorType>
com.evolveum.midpoint.model.common.expression.script.ScriptExpressionEvaluator<V,D>
- All Implemented Interfaces:
ExpressionEvaluator<V>
public class ScriptExpressionEvaluator<V extends PrismValue,D extends ItemDefinition<?>>
extends AbstractValueTransformationExpressionEvaluator<V,D,ScriptExpressionEvaluatorType>
Executes specified script written e.g. in Groovy, JavaScript, Python, etc.
Apache Velocity template language is supported as well,
It is a part of
Expression
and ExpressionEvaluator
framework.
This class is a bridge between the "relativity" and "script execution" aspects of the script expression evaluation:
. ScriptExpression
evaluates scripts and ignores all those complex aspects of expressions' relativity,
. and AbstractValueTransformationExpressionEvaluator
and the super-classes deal with relativity handling (etc)
and ignore technical aspects of running Groovy/JS/whatever scripts.- Author:
- Radovan Semancik
-
Field Summary
Fields inherited from class com.evolveum.midpoint.model.common.expression.evaluator.transformation.AbstractValueTransformationExpressionEvaluator
localizationService, securityContextManager
Fields inherited from class com.evolveum.midpoint.repo.common.expression.evaluator.AbstractExpressionEvaluator
expressionEvaluatorBean, outputDefinition, prismContext, protector
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Check expression profile.Short characterization of the evaluator.transformSingleValue
(@NotNull ValueTransformationContext vtCtx, @NotNull OperationResult result) Transforms single value or single values tuple.Methods inherited from class com.evolveum.midpoint.model.common.expression.evaluator.transformation.AbstractValueTransformationExpressionEvaluator
evaluate, isIncludeNullInputs, isRelative
Methods inherited from class com.evolveum.midpoint.repo.common.expression.evaluator.AbstractExpressionEvaluator
addInternalOrigin, applyValueMetadata, findInSourcesAndVariables, finishOutputTriple, getElementName, getOutputDefinition, getPrismContext, getProtector
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.repo.common.expression.ExpressionEvaluator
doesVetoTargetValueRemoval
-
Method Details
-
checkEvaluatorProfile
Description copied from class:AbstractExpressionEvaluator
Check expression profile. Throws security exception if the execution is not allowed by the profile.This implementation works only for simple evaluators that do not have any profile settings. Complex evaluators should override this method.
- Overrides:
checkEvaluatorProfile
in classAbstractExpressionEvaluator<V extends PrismValue,
D extends ItemDefinition<?>, ScriptExpressionEvaluatorType>
-
transformSingleValue
@NotNull protected @NotNull List<V> transformSingleValue(@NotNull @NotNull ValueTransformationContext vtCtx, @NotNull @NotNull OperationResult result) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException Description copied from class:AbstractValueTransformationExpressionEvaluator
Transforms single value or single values tuple.- Specified by:
transformSingleValue
in classAbstractValueTransformationExpressionEvaluator<V extends PrismValue,
D extends ItemDefinition<?>, ScriptExpressionEvaluatorType> - Throws:
ExpressionEvaluationException
ObjectNotFoundException
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
-
shortDebugDump
Description copied from interface:ExpressionEvaluator
Short characterization of the evaluator. One line, often only a single word.
-