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, securityContextManagerFields inherited from class com.evolveum.midpoint.repo.common.expression.evaluator.AbstractExpressionEvaluator
expressionEvaluatorBean, outputDefinition, prismContext, protector -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCheck 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, getExpressionEvaluatorBean, isIncludeNullInputs, isRelativeMethods inherited from class com.evolveum.midpoint.repo.common.expression.evaluator.AbstractExpressionEvaluator
addInternalOrigin, applyValueMetadata, findInSourcesAndVariables, finishOutputTriple, getElementName, getOutputDefinition, getPrismContext, getProtectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.repo.common.expression.ExpressionEvaluator
doesVetoTargetValueRemoval
-
Method Details
-
checkEvaluatorProfile
Description copied from class:AbstractExpressionEvaluatorCheck 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:
checkEvaluatorProfilein 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:AbstractValueTransformationExpressionEvaluatorTransforms single value or single values tuple.- Specified by:
transformSingleValuein classAbstractValueTransformationExpressionEvaluator<V extends PrismValue,D extends ItemDefinition<?>, ScriptExpressionEvaluatorType> - Throws:
ExpressionEvaluationExceptionObjectNotFoundExceptionSchemaExceptionCommunicationExceptionConfigurationExceptionSecurityViolationException
-
shortDebugDump
Description copied from interface:ExpressionEvaluatorShort characterization of the evaluator. One line, often only a single word.
-