com.evolveum.midpoint.common.mapping
Class Mapping<V extends PrismValue>
java.lang.Object
com.evolveum.midpoint.common.mapping.Mapping<V>
- All Implemented Interfaces:
- DebugDumpable, Dumpable
public class Mapping<V extends PrismValue>
- extends Object
- implements Dumpable, DebugDumpable
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.
- Author:
- Radovan Semancik
Method Summary |
void |
addVariableDefinition(ExpressionVariableDefinitionType varDef)
|
void |
addVariableDefinition(QName name,
Element value)
|
void |
addVariableDefinition(QName name,
int value)
|
void |
addVariableDefinition(QName name,
ObjectDeltaObject<?> value)
|
void |
addVariableDefinition(QName name,
ObjectReferenceType objectRef)
|
void |
addVariableDefinition(QName name,
ObjectType objectType)
|
void |
addVariableDefinition(QName name,
PrismObject<? extends ObjectType> midpointObject)
|
void |
addVariableDefinition(QName name,
PrismValue value)
|
void |
addVariableDefinition(QName name,
String value)
|
void |
addVariableDefinitions(Map<QName,Object> extraVariables)
|
Mapping<V> |
clone()
Shallow clone. |
ItemDelta<V> |
createEmptyDelta(ItemPath path)
|
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator. |
String |
debugDump(int indent)
|
String |
dump()
Show the content of the object intended for diagnostics by developer. |
boolean |
equals(Object obj)
|
void |
evaluate(OperationResult result)
|
String |
getContextDescription()
|
Source<?> |
getDefaultSource()
|
ItemDefinition |
getDefaultTargetDefinition()
|
FilterManager<Filter> |
getFilterManager()
|
QName |
getItemName()
|
ObjectResolver |
getObjectResolver()
|
ObjectType |
getOriginObject()
|
OriginType |
getOriginType()
|
Item<V> |
getOutput()
|
ItemDefinition |
getOutputDefinition()
|
ItemPath |
getOutputPath()
|
PrismValueDeltaSetTriple<V> |
getOutputTriple()
|
static
|
getPropertyStatic(ExpressionType expressionType,
PrismPropertyDefinition outputDefinition,
String contextDescription,
PrismContext prismContext)
|
static
|
getPropertyStaticRealValues(ExpressionType expressionType,
PrismPropertyDefinition outputDefinition,
String contextDescription,
PrismContext prismContext)
Always returns collection, even for single-valued results. |
ObjectDeltaObject<?> |
getSourceContext()
|
static Object |
getStaticOutput(ExpressionType expressionType,
PrismPropertyDefinition outputDefinition,
String contextDescription,
ExpressionReturnMultiplicityType preferredMultiplicity,
PrismContext prismContext)
Returns either Object (if result is supposed to be single-value) or Collection (if result is supposed to be multi-value) |
MappingStrengthType |
getStrength()
|
StringPolicyResolver |
getStringPolicyResolver()
|
PrismObjectDefinition<?> |
getTargetContext()
|
int |
hashCode()
|
boolean |
hasVariableDefinition(QName varName)
|
boolean |
isApplicableToChannel(String channelUri)
|
boolean |
isAuthoritative()
|
boolean |
isConditionMaskNew()
|
boolean |
isConditionMaskOld()
|
boolean |
isExclusive()
|
void |
setConditionMaskNew(boolean conditionMaskNew)
|
void |
setConditionMaskOld(boolean conditionMaskOld)
|
void |
setContextDescription(String contextDescription)
|
void |
setDefaultSource(Source<?> defaultSource)
|
void |
setDefaultTargetDefinition(ItemDefinition defaultTargetDefinition)
|
void |
setFilterManager(FilterManager<Filter> filterManager)
|
void |
setObjectResolver(ObjectResolver objectResolver)
|
void |
setOriginObject(ObjectType originObject)
|
void |
setOriginType(OriginType sourceType)
|
void |
setRootNode(ObjectDeltaObject<?> odo)
|
void |
setRootNode(ObjectReferenceType objectRef)
|
void |
setRootNode(ObjectType objectType)
|
void |
setRootNode(PrismObject<? extends ObjectType> mpObject)
|
void |
setSourceContext(ObjectDeltaObject<?> sourceContext)
|
void |
setStringPolicyResolver(StringPolicyResolver stringPolicyResolver)
|
void |
setTargetContext(PrismObjectDefinition<?> targetContext)
|
String |
toString()
|
getObjectResolver
public ObjectResolver getObjectResolver()
setObjectResolver
public void setObjectResolver(ObjectResolver objectResolver)
getItemName
public QName getItemName()
getOriginType
public OriginType getOriginType()
setOriginType
public void setOriginType(OriginType sourceType)
getOriginObject
public ObjectType getOriginObject()
setOriginObject
public void setOriginObject(ObjectType originObject)
getDefaultSource
public Source<?> getDefaultSource()
setDefaultSource
public void setDefaultSource(Source<?> defaultSource)
getDefaultTargetDefinition
public ItemDefinition getDefaultTargetDefinition()
setDefaultTargetDefinition
public void setDefaultTargetDefinition(ItemDefinition defaultTargetDefinition)
getSourceContext
public ObjectDeltaObject<?> getSourceContext()
setSourceContext
public void setSourceContext(ObjectDeltaObject<?> sourceContext)
getTargetContext
public PrismObjectDefinition<?> getTargetContext()
setTargetContext
public void setTargetContext(PrismObjectDefinition<?> targetContext)
getContextDescription
public String getContextDescription()
setContextDescription
public void setContextDescription(String contextDescription)
setRootNode
public void setRootNode(ObjectReferenceType objectRef)
setRootNode
public void setRootNode(ObjectDeltaObject<?> odo)
setRootNode
public void setRootNode(ObjectType objectType)
setRootNode
public void setRootNode(PrismObject<? extends ObjectType> mpObject)
addVariableDefinition
public void addVariableDefinition(ExpressionVariableDefinitionType varDef)
addVariableDefinition
public void addVariableDefinition(QName name,
ObjectReferenceType objectRef)
addVariableDefinition
public void addVariableDefinition(QName name,
ObjectType objectType)
addVariableDefinition
public void addVariableDefinition(QName name,
PrismObject<? extends ObjectType> midpointObject)
addVariableDefinition
public void addVariableDefinition(QName name,
String value)
addVariableDefinition
public void addVariableDefinition(QName name,
int value)
addVariableDefinition
public void addVariableDefinition(QName name,
Element value)
addVariableDefinition
public void addVariableDefinition(QName name,
PrismValue value)
addVariableDefinition
public void addVariableDefinition(QName name,
ObjectDeltaObject<?> value)
addVariableDefinitions
public void addVariableDefinitions(Map<QName,Object> extraVariables)
hasVariableDefinition
public boolean hasVariableDefinition(QName varName)
getStrength
public MappingStrengthType getStrength()
isAuthoritative
public boolean isAuthoritative()
isExclusive
public boolean isExclusive()
isConditionMaskOld
public boolean isConditionMaskOld()
setConditionMaskOld
public void setConditionMaskOld(boolean conditionMaskOld)
isConditionMaskNew
public boolean isConditionMaskNew()
setConditionMaskNew
public void setConditionMaskNew(boolean conditionMaskNew)
getFilterManager
public FilterManager<Filter> getFilterManager()
setFilterManager
public void setFilterManager(FilterManager<Filter> filterManager)
getStringPolicyResolver
public StringPolicyResolver getStringPolicyResolver()
setStringPolicyResolver
public void setStringPolicyResolver(StringPolicyResolver stringPolicyResolver)
isApplicableToChannel
public boolean isApplicableToChannel(String channelUri)
evaluate
public void evaluate(OperationResult result)
throws ExpressionEvaluationException,
ObjectNotFoundException,
SchemaException
- Throws:
ExpressionEvaluationException
ObjectNotFoundException
SchemaException
getOutputDefinition
public ItemDefinition getOutputDefinition()
throws SchemaException
- Throws:
SchemaException
getOutputPath
public ItemPath getOutputPath()
throws SchemaException
- Throws:
SchemaException
getOutputTriple
public PrismValueDeltaSetTriple<V> getOutputTriple()
getOutput
public Item<V> getOutput()
throws SchemaException
- Throws:
SchemaException
createEmptyDelta
public ItemDelta<V> createEmptyDelta(ItemPath path)
getPropertyStatic
public static <X> PrismProperty<X> getPropertyStatic(ExpressionType expressionType,
PrismPropertyDefinition outputDefinition,
String contextDescription,
PrismContext prismContext)
throws SchemaException
- Throws:
SchemaException
getPropertyStaticRealValues
public static <X> Collection<X> getPropertyStaticRealValues(ExpressionType expressionType,
PrismPropertyDefinition outputDefinition,
String contextDescription,
PrismContext prismContext)
throws SchemaException
- Always returns collection, even for single-valued results.
- Throws:
SchemaException
getStaticOutput
public static Object getStaticOutput(ExpressionType expressionType,
PrismPropertyDefinition outputDefinition,
String contextDescription,
ExpressionReturnMultiplicityType preferredMultiplicity,
PrismContext prismContext)
throws SchemaException
- Returns either Object (if result is supposed to be single-value) or Collection (if result is supposed to be multi-value)
- Throws:
SchemaException
clone
public Mapping<V> clone()
- Shallow clone. Only the output is cloned deeply.
- Overrides:
clone
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
debugDump
public String debugDump()
- Description copied from interface:
DebugDumpable
- Show the content of the object intended for diagnostics by system administrator. The out
put should be suitable to use in system logs at "debug" level. It may be multi-line, but in
that case it should be well indented and quite terse.
As it is intended to be used by system administrator, it should not use any developer terms
such as class names, exceptions or stack traces.
- Specified by:
debugDump
in interface DebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interface DebugDumpable
dump
public String dump()
- Description copied from interface:
Dumpable
- Show the content of the object intended for diagnostics by developer.
The content may be multi-line, in case of hierarchical objects it may be intended.
The use of this method may not be efficient. It is not supposed to be used in normal operation.
However, it is very useful in tests or in case of dumping objects in severe error situations.
- Specified by:
dump
in interface Dumpable
- Returns:
- content of the object intended for diagnostics.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013 evolveum. All Rights Reserved.