Class MappingImpl<V extends PrismValue,D extends ItemDefinition>
- java.lang.Object
-
- com.evolveum.midpoint.model.common.mapping.MappingImpl<V,D>
-
- All Implemented Interfaces:
Mapping<V,D>
,PrismValueDeltaSetTripleProducer<V,D>
,DebugDumpable
,HumanReadableDescribable
public class MappingImpl<V extends PrismValue,D extends ItemDefinition> extends Object implements Mapping<V,D>, DebugDumpable, PrismValueDeltaSetTripleProducer<V,D>
Mapping is non-recyclable single-use object. Once evaluated it should not be evaluated again. It will retain its original inputs and outputs that can be read again and again. But these should not be changed after evaluation. Configuration properties are unmodifiable. They are to be set via Mapping.Builder.- Author:
- Radovan Semancik
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MappingImpl.Builder<V extends PrismValue,D extends ItemDefinition>
Builder is used to construct a configuration of Mapping object, which - after building - becomes immutable.
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Method Detail
-
getObjectResolver
public ObjectResolver getObjectResolver()
-
getItemName
public QName getItemName()
-
getOriginType
public OriginType getOriginType()
-
getOriginObject
public ObjectType getOriginObject()
-
getDefaultSource
public Source<?,?> getDefaultSource()
-
getDefaultTargetDefinition
public D getDefaultTargetDefinition()
-
getDefaultTargetPath
public ItemPath getDefaultTargetPath()
-
getSourceContext
public ObjectDeltaObject<?> getSourceContext()
-
getTargetContext
public PrismObjectDefinition<?> getTargetContext()
-
getContextDescription
public String getContextDescription()
-
getMappingContextDescription
public String getMappingContextDescription()
-
getMappingType
public MappingType getMappingType()
-
getMappingPreExpression
public MappingPreExpression getMappingPreExpression()
-
setMappingPreExpression
public void setMappingPreExpression(MappingPreExpression mappingPreExpression)
-
isSourceless
public boolean isSourceless()
Description copied from interface:PrismValueDeltaSetTripleProducer
Returns true if the mapping has no source. That means it has to be evaluated for any delta. This really applies only to normal-strength mappings.- Specified by:
isSourceless
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
-
getStrength
public MappingStrengthType getStrength()
- Specified by:
getStrength
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
-
getStrength
public static MappingStrengthType getStrength(MappingType mappingType)
-
isAuthoritative
public boolean isAuthoritative()
- Specified by:
isAuthoritative
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
-
isExclusive
public boolean isExclusive()
- Specified by:
isExclusive
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
-
hasTargetRange
public boolean hasTargetRange()
-
isConditionMaskOld
public boolean isConditionMaskOld()
-
isConditionMaskNew
public boolean isConditionMaskNew()
-
getStringPolicyResolver
public ValuePolicyResolver getStringPolicyResolver()
-
isApplicableToChannel
public boolean isApplicableToChannel(String channelUri)
-
isApplicableToChannel
public static boolean isApplicableToChannel(MappingType mappingType, String channelUri)
-
getNow
public XMLGregorianCalendar getNow()
-
getDefaultReferenceTime
public XMLGregorianCalendar getDefaultReferenceTime()
-
getNextRecomputeTime
public XMLGregorianCalendar getNextRecomputeTime()
-
isProfiling
public boolean isProfiling()
-
getEvaluationStartTime
public Long getEvaluationStartTime()
-
getEvaluationEndTime
public Long getEvaluationEndTime()
-
getEtime
public Long getEtime()
Description copied from interface:Mapping
Returns elapsed time in milliseconds.- Specified by:
getEtime
in interfaceMapping<V extends PrismValue,D extends ItemDefinition>
-
getMappingQName
public QName getMappingQName()
- Specified by:
getMappingQName
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
-
getRefinedObjectClassDefinition
public RefinedObjectClassDefinition getRefinedObjectClassDefinition()
-
getStateProperty
public <T> T getStateProperty(String propertyName)
- Specified by:
getStateProperty
in interfaceMapping<V extends PrismValue,D extends ItemDefinition>
-
setStateProperty
public <T> T setStateProperty(String propertyName, T value)
- Specified by:
setStateProperty
in interfaceMapping<V extends PrismValue,D extends ItemDefinition>
-
evaluate
public void evaluate(Task task, OperationResult parentResult) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException
-
prepare
public void prepare(Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException, SecurityViolationException, ConfigurationException, CommunicationException
Prepare mapping for evaluation. Parse the values After this call it can checked if a mapping is activated (i.e. if the input changes will "trigger" the mapping).
-
isActivated
public boolean isActivated()
-
evaluateBody
public void evaluateBody(Task task, OperationResult parentResult) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException
-
isSatisfyCondition
public boolean isSatisfyCondition()
-
getConditionOutputTriple
public PrismValueDeltaSetTriple<PrismPropertyValue<Boolean>> getConditionOutputTriple()
-
evaluateTimeConstraintValid
public Boolean evaluateTimeConstraintValid(Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
getOutputDefinition
public D getOutputDefinition() throws SchemaException
- Throws:
SchemaException
-
getOutputPath
public ItemPath getOutputPath() throws SchemaException
- Throws:
SchemaException
-
getOutputTriple
public PrismValueDeltaSetTriple<V> getOutputTriple()
Description copied from interface:PrismValueDeltaSetTripleProducer
Null output tripple means "the mapping is not applicable", e.g. due to the condition being false. Empty output triple means "the mapping is applicable but there are no values".- Specified by:
getOutputTriple
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
-
getOutput
public Item<V,D> getOutput() throws SchemaException
- Throws:
SchemaException
-
clone
public PrismValueDeltaSetTripleProducer<V,D> clone()
Shallow clone. Only the output is cloned deeply.- Specified by:
clone
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
- Overrides:
clone
in classObject
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
getIdentifier
public String getIdentifier()
Description copied from interface:PrismValueDeltaSetTripleProducer
Identifier of this producer; e.g. mapping name.- Specified by:
getIdentifier
in interfacePrismValueDeltaSetTripleProducer<V extends PrismValue,D extends ItemDefinition>
-
toHumanReadableDescription
public String toHumanReadableDescription()
- Specified by:
toHumanReadableDescription
in interfaceHumanReadableDescribable
-
-