Class AbstractExpressionEvaluator<V extends PrismValue,D extends ItemDefinition<?>,E>
java.lang.Object
com.evolveum.midpoint.repo.common.expression.evaluator.AbstractExpressionEvaluator<V,D,E>
- Type Parameters:
E
- evaluator bean (configuration) type
- All Implemented Interfaces:
ExpressionEvaluator<V>
- Direct Known Subclasses:
AbstractValueTransformationExpressionEvaluator
,AsIsExpressionEvaluator
,AssociationFromLinkExpressionEvaluator
,ConstExpressionEvaluator
,FunctionExpressionEvaluator
,GenerateExpressionEvaluator
,LiteralExpressionEvaluator
,PathExpressionEvaluator
,ProportionalExpressionEvaluator
,ReferenceAttributeFromLinkExpressionEvaluator
,SequentialValueExpressionEvaluator
public abstract class AbstractExpressionEvaluator<V extends PrismValue,D extends ItemDefinition<?>,E>
extends Object
implements ExpressionEvaluator<V>
Evaluates an expression defined by
expressionEvaluatorBean
.- Author:
- Radovan Semancik
-
Field Summary
Modifier and TypeFieldDescriptionprotected final E
Bean (i.e.protected final D
Definition of the output item.protected final @NotNull PrismContext
protected final Protector
-
Constructor Summary
ConstructorDescriptionAbstractExpressionEvaluator
(@NotNull QName elementName, E expressionEvaluatorBean, D outputDefinition, Protector protector) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addInternalOrigin
(PrismValue value, ExpressionEvaluationContext context) Adds Internal origin for given prismValue.void
applyValueMetadata
(PrismValueDeltaSetTriple<V> triple, ExpressionEvaluationContext context, OperationResult result) Applies value metadata to the triple to-be-outputted.protected void
Check expression profile.TypedValue<?>
findInSourcesAndVariables
(ExpressionEvaluationContext context, String variableName) finishOutputTriple
(PrismValueDeltaSetTriple<V> resultTriple, Function<Object, Object> additionalConvertor, ItemPath residualPath) Converts intermediate expression result triple to the final output triple according to expected Java type and additional convertor.@NotNull QName
Fully qualified name of the element defining the expression (e.g.@NotNull PrismContext
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, evaluate, shortDebugDump
-
Field Details
-
expressionEvaluatorBean
Bean (i.e. configuration) for the evaluator. In some cases it can be null - e.g. for implicit asIs evaluator. -
outputDefinition
Definition of the output item. Needed for some of the evaluators (the question is if it's really needed). -
protector
-
prismContext
-
-
Constructor Details
-
AbstractExpressionEvaluator
-
-
Method Details
-
getElementName
Description copied from interface:ExpressionEvaluator
Fully qualified name of the element defining the expression (e.g. c:path).- Specified by:
getElementName
in interfaceExpressionEvaluator<V extends PrismValue>
-
checkEvaluatorProfile
protected void checkEvaluatorProfile(ExpressionEvaluationContext context) throws SecurityViolationException 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.
- Throws:
SecurityViolationException
- expression execution is not allowed by the profile.
-
getPrismContext
-
getOutputDefinition
-
getProtector
-
finishOutputTriple
public PrismValueDeltaSetTriple<V> finishOutputTriple(PrismValueDeltaSetTriple<V> resultTriple, Function<Object, Object> additionalConvertor, ItemPath residualPath) Converts intermediate expression result triple to the final output triple according to expected Java type and additional convertor. TODO why it is used only for some evaluators? -
findInSourcesAndVariables
public TypedValue<?> findInSourcesAndVariables(ExpressionEvaluationContext context, String variableName) -
addInternalOrigin
protected void addInternalOrigin(PrismValue value, ExpressionEvaluationContext context) throws SchemaException Adds Internal origin for given prismValue. Assumes that value has no metadata. (Currently does not fill-in actorRef nor channel.)- Throws:
SchemaException
-
applyValueMetadata
public void applyValueMetadata(PrismValueDeltaSetTriple<V> triple, ExpressionEvaluationContext context, OperationResult result) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException Applies value metadata to the triple to-be-outputted. To be used for simple mappings that basically copy data from given source (input IDI or some other data source) to the output.
-