Class VariablesMap
java.lang.Object
com.evolveum.midpoint.schema.expression.VariablesMap
- All Implemented Interfaces:
- DebugDumpable,- Map<String,- TypedValue<?>> 
- Author:
- semancik
- 
Nested Class Summary
- 
Field SummaryFields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<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.voidaddVariableWithDeterminedDefinition(@NotNull String name, @NotNull ObjectType value) Tries to determine the definition of the variable value.voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) static VariablesMapcreate(PrismContext prismContext, Object... parameters) Expects name-value-definition triplets.debugDump(int indent) static VariablesMapemptyMap()@NotNull Set<Map.Entry<String,TypedValue<?>>> entrySet()booleanTypedValue<?>@NotNull Collection<String>getAliases(String key) getAliasResolution(String key) <T> T<O extends ObjectType>
 PrismObject<O>getValueNew(String name) inthashCode()booleanbooleanbooleanisEmpty()keySet()TypedValue<?>put(String key, TypedValue<?> typedValue) <D extends ItemDefinition>
 TypedValue<T> TypedValue<?>Note: Type of the value should really be Object and not T.voidputAll(@NotNull Map<? extends String, ? extends TypedValue<?>> m) void<T> TypedValue<List<T>>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>Convenience method to put objects with definition.voidregisterAlias(String alias, @Nullable String realName) voidUse only if you previously register all variables from this map!TypedValue<?><D extends ItemDefinition<?>>
 voidreplaceVariableDefinition(String name, Object value, D definition) voidsetRootNode(ObjectReferenceType objectRef, PrismReferenceDefinition def) @NotNull VariablesMapintsize()toString()voidunregisterAlias(String alias) @NotNull Collection<TypedValue<?>>values()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
VariablesMappublic VariablesMap()
 
- 
- 
Method Details- 
sizepublic int size()- Specified by:
- sizein interface- Map<String,- TypedValue<?>> 
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Map<String,- TypedValue<?>> 
 
- 
containsKey- Specified by:
- containsKeyin interface- Map<String,- TypedValue<?>> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<String,- TypedValue<?>> 
 
- 
get- Specified by:
- getin interface- Map<String,- TypedValue<?>> 
 
- 
put- Specified by:
- putin interface- Map<String,- TypedValue<?>> 
 
- 
registerAlias
- 
registerAliasesFromUse only if you previously register all variables from this map!
- 
unregisterAlias
- 
put
- 
putNote: 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.
- 
putListConvenience 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.
- 
remove- Specified by:
- removein interface- Map<String,- TypedValue<?>> 
 
- 
putAll- Specified by:
- putAllin interface- Map<String,- TypedValue<?>> 
 
- 
putAll
- 
clearpublic void clear()- Specified by:
- clearin interface- Map<String,- TypedValue<?>> 
 
- 
keySet- Specified by:
- keySetin interface- Map<String,- TypedValue<?>> 
 
- 
values- Specified by:
- valuesin interface- Map<String,- TypedValue<?>> 
 
- 
entrySet- Specified by:
- entrySetin interface- Map<String,- TypedValue<?>> 
 
- 
create@VisibleForTesting public 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.
- 
emptyMap
- 
formatVariables
- 
getAliases
- 
isAlias
- 
getAliasResolution
- 
dumpSingleLine
- 
debugDump- Specified by:
- debugDumpin interface- DebugDumpable
 
- 
addVariableDefinitionsAdds 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) 
- 
addVariableDefinitionsOldAdds map of extra variables to the expression. If there are variables with deltas (ObjectDeltaObject) it takes the "old" version of the object.
- 
addVariableDefinitionsNewAdds map of extra variables to the expression. If there are variables with deltas (ObjectDeltaObject) it takes the "new" version of the object.
- 
setRootNode
- 
addVariableWithDeterminedDefinitionpublic void addVariableWithDeterminedDefinition(@NotNull @NotNull String name, @NotNull @NotNull ObjectType value) Tries to determine the definition of the variable value.
- 
addVariableDefinitionpublic <D extends ItemDefinition<?>> void addVariableDefinition(String name, Object value, D definition) 
- 
replaceVariableDefinitionpublic <D extends ItemDefinition<?>> void replaceVariableDefinition(String name, Object value, D definition) 
- 
getValue
- 
getValue- Throws:
- SchemaException
 
- 
getValueNew- Throws:
- SchemaException
 
- 
haveDeltaspublic boolean haveDeltas()
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
- 
shallowClone
 
-