Class VariablesMap
- java.lang.Object
- 
- com.evolveum.midpoint.schema.expression.VariablesMap
 
- 
- All Implemented Interfaces:
- DebugDumpable,- Map<String,TypedValue>
 
 public class VariablesMap extends Object implements Map<String,TypedValue>, DebugDumpable - Author:
- semancik
 
- 
- 
Field Summary- 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
 
- 
 - 
Constructor SummaryConstructors Constructor Description VariablesMap()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <D extends ItemDefinition>
 voidaddVariableDefinition(String name, Object value, D definition)voidaddVariableDefinitions(VariablesMap extraVariables)Adds map of extra variables to the expression.voidaddVariableDefinitions(VariablesMap extraVariables, @NotNull Collection<String> exceptFor)voidaddVariableDefinitionsNew(VariablesMap extraVariables)Adds map of extra variables to the expression.voidaddVariableDefinitionsOld(VariablesMap extraVariables)Adds map of extra variables to the expression.voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)static VariablesMapcreate(PrismContext prismContext, Object... parameters)Expects name-value-definition triplets.StringdebugDump(int indent)StringdumpSingleLine()static VariablesMapemptyMap()@NotNull Set<Map.Entry<String,TypedValue>>entrySet()booleanequals(Object o)protected voidfillIn(PrismContext prismContext, Object... parameters)Expects name-value-definition triplets.StringformatVariables()TypedValueget(Object key)@NotNull Collection<String>getAliases(String key)StringgetAliasResolution(String key)ObjectgetValue(String name)<T> TgetValue(String name, Class<T> type)<O extends ObjectType>
 PrismObject<O>getValueNew(String name)inthashCode()booleanhaveDeltas()booleanisAlias(String key)booleanisEmpty()@NotNull Set<String>keySet()TypedValueput(String key, TypedValue typedValue)<D extends ItemDefinition>
 TypedValueput(String key, Object value, D definition)<T> TypedValueput(String key, Object value, Class<T> typeClass)Note: Type of the value should really be Object and not T.voidputAll(VariablesMap m)voidputAll(Map<? extends String,? extends TypedValue> m)<T> TypedValue<List<T>>putList(String key, List<T> list)Convenience method to put multivalue variables (lists).<O extends ObjectType>
 TypedValue<O>putObject(String key, PrismObject<O> object, Class<O> expectedClass)Convenience method to put objects with definition.<O extends ObjectType>
 TypedValue<O>putObject(String key, O objectType, Class<O> expectedClass)Convenience method to put objects with definition.voidregisterAlias(String alias, @Nullable String realName)voidregisterAliasesFrom(VariablesMap map)Use only if you previously register all variables from this map!TypedValueremove(Object key)<D extends ItemDefinition>
 voidreplaceVariableDefinition(String name, Object value, D definition)voidsetRootNode(ObjectReferenceType objectRef, PrismReferenceDefinition def)intsize()StringtoString()voidunregisterAlias(String alias)@NotNull Collection<TypedValue>values()- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazily
 - 
Methods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
 
- 
 
- 
- 
- 
Method Detail- 
sizepublic int size() - Specified by:
- sizein interface- Map<String,TypedValue>
 
 - 
isEmptypublic boolean isEmpty() - Specified by:
- isEmptyin interface- Map<String,TypedValue>
 
 - 
containsKeypublic boolean containsKey(Object key) - Specified by:
- containsKeyin interface- Map<String,TypedValue>
 
 - 
containsValuepublic boolean containsValue(Object value) - Specified by:
- containsValuein interface- Map<String,TypedValue>
 
 - 
getpublic TypedValue get(Object key) - Specified by:
- getin interface- Map<String,TypedValue>
 
 - 
putpublic TypedValue put(String key, TypedValue typedValue) - Specified by:
- putin interface- Map<String,TypedValue>
 
 - 
registerAliasesFrompublic void registerAliasesFrom(VariablesMap map) Use only if you previously register all variables from this map!
 - 
unregisterAliaspublic void unregisterAlias(String alias) 
 - 
putpublic <D extends ItemDefinition> TypedValue put(String key, Object value, D definition) 
 - 
putpublic <T> TypedValue put(String key, Object value, Class<T> typeClass) Note: Type of the value should really be Object and not T. The value may be quite complicated, e.g. it may be ItemDeltaItem of the actual real value. However, the class defines the real type of the value precisely.
 - 
putObjectpublic <O extends ObjectType> TypedValue<O> putObject(String key, O objectType, Class<O> expectedClass) Convenience method to put objects with definition. Maybe later improve by looking up full definition.
 - 
putObjectpublic <O extends ObjectType> TypedValue<O> putObject(String key, PrismObject<O> object, Class<O> expectedClass) Convenience method to put objects with definition. Maybe later improve by looking up full definition.
 - 
putListpublic <T> TypedValue<List<T>> putList(String key, List<T> list) Convenience method to put multivalue variables (lists). This is very simple now. But later on we may need to declare generics. Therefore dedicated method would be easier to find all usages and fix them.
 - 
removepublic TypedValue remove(Object key) - Specified by:
- removein interface- Map<String,TypedValue>
 
 - 
putAllpublic void putAll(Map<? extends String,? extends TypedValue> m) - Specified by:
- putAllin interface- Map<String,TypedValue>
 
 - 
putAllpublic void putAll(VariablesMap m) 
 - 
clearpublic void clear() - Specified by:
- clearin interface- Map<String,TypedValue>
 
 - 
keySet@NotNull public @NotNull Set<String> keySet() - Specified by:
- keySetin interface- Map<String,TypedValue>
 
 - 
values@NotNull public @NotNull Collection<TypedValue> values() - Specified by:
- valuesin interface- Map<String,TypedValue>
 
 - 
entrySet@NotNull public @NotNull Set<Map.Entry<String,TypedValue>> entrySet() - Specified by:
- entrySetin interface- Map<String,TypedValue>
 
 - 
createpublic static VariablesMap create(PrismContext prismContext, Object... parameters) Expects name-value-definition triplets. Definition can be just a type QName. E.g. create(var1name, var1value, var1type, var2name, var2value, var2type, ...) Mostly for testing. Use at your own risk.
 - 
fillInprotected void fillIn(PrismContext prismContext, Object... parameters) Expects name-value-definition triplets. Definition can be just a type QName. E.g. create(var1name, var1value, var1type, var2name, var2value, var2type, ...) Mostly for testing. Use at your own risk.
 - 
emptyMappublic static VariablesMap emptyMap() 
 - 
formatVariablespublic String formatVariables() 
 - 
getAliases@NotNull public @NotNull Collection<String> getAliases(String key) 
 - 
isAliaspublic boolean isAlias(String key) 
 - 
dumpSingleLinepublic String dumpSingleLine() 
 - 
debugDumppublic String debugDump(int indent) - Specified by:
- debugDumpin interface- DebugDumpable
 
 - 
addVariableDefinitionspublic void addVariableDefinitions(VariablesMap extraVariables) Adds map of extra variables to the expression. If there are variables with deltas (ObjectDeltaObject) the operation fail because it cannot decide which version to use.
 - 
addVariableDefinitionspublic void addVariableDefinitions(VariablesMap extraVariables, @NotNull @NotNull Collection<String> exceptFor) 
 - 
addVariableDefinitionsOldpublic void addVariableDefinitionsOld(VariablesMap extraVariables) Adds map of extra variables to the expression. If there are variables with deltas (ObjectDeltaObject) it takes the "old" version of the object.
 - 
addVariableDefinitionsNewpublic void addVariableDefinitionsNew(VariablesMap extraVariables) Adds map of extra variables to the expression. If there are variables with deltas (ObjectDeltaObject) it takes the "new" version of the object.
 - 
setRootNodepublic void setRootNode(ObjectReferenceType objectRef, PrismReferenceDefinition def) 
 - 
addVariableDefinitionpublic <D extends ItemDefinition> void addVariableDefinition(String name, Object value, D definition) 
 - 
replaceVariableDefinitionpublic <D extends ItemDefinition> void replaceVariableDefinition(String name, Object value, D definition) 
 - 
getValuepublic <T> T getValue(String name, Class<T> type) throws SchemaException - Throws:
- SchemaException
 
 - 
getValueNewpublic <O extends ObjectType> PrismObject<O> getValueNew(String name) throws SchemaException - Throws:
- SchemaException
 
 - 
haveDeltaspublic boolean haveDeltas() 
 - 
equalspublic boolean equals(Object o) 
 - 
hashCodepublic int hashCode() 
 
- 
 
-