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. Velocity template language is supported as well.- 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkEvaluatorProfile(ExpressionEvaluationContext context)
Check expression profile.String
shortDebugDump()
Short characterization of the evaluator.protected @NotNull List<V>
transformSingleValue(VariablesMap variables, PlusMinusZero valueDestination, boolean useNew, ExpressionEvaluationContext eCtx, String contextDescription, Task task, OperationResult result)
Transforms single value 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
-
-
-
-
Method Detail
-
checkEvaluatorProfile
protected void checkEvaluatorProfile(ExpressionEvaluationContext context)
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(VariablesMap variables, PlusMinusZero valueDestination, boolean useNew, ExpressionEvaluationContext eCtx, String contextDescription, Task task, OperationResult result) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
Description copied from class:AbstractValueTransformationExpressionEvaluator
Transforms single value tuple.- Specified by:
transformSingleValue
in classAbstractValueTransformationExpressionEvaluator<V extends PrismValue,D extends ItemDefinition<?>,ScriptExpressionEvaluatorType>
- Parameters:
variables
- Variables to be applied. Must not be relativistic! All deltas must be sorted out by now.valueDestination
- Where we are going to put output value(s). Actually it's only supplementary information for the transformer as the actual placement of output values is done in the caller.useNew
- Are we using "new" state of sources/input variables? Again, this is only supplementary information, because the variables should be already non-relativistic. Some scripts need to know the value of "useNew".eCtx
- Caller-specified context of the whole expression evaluation.- Throws:
ExpressionEvaluationException
ObjectNotFoundException
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
-
shortDebugDump
public String shortDebugDump()
Description copied from interface:ExpressionEvaluator
Short characterization of the evaluator. One line, often only a single word.
-
-