Class VariableMapResolver
java.lang.Object
io.wcm.devops.conga.generator.util.VariableMapResolver
Resolve variables in a map referencing other entries from the same map.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDe-escapes all escaped variables in all string values in the given map.Replace variable placeholders in values of a map with syntax ${key} with values from the map itself.Replace variable placeholders in values of a map with syntax ${key} with values from the map itself.
-
Constructor Details
-
VariableMapResolver
- Parameters:
valueProviderGlobalContext
- Value provider global context
-
-
Method Details
-
resolve
Replace variable placeholders in values of a map with syntax ${key} with values from the map itself. The variables can recursively reference each other. All escaped variables are deescaped.- Parameters:
config
- Config map with values with variable placeholders- Returns:
- Config map with values with variable placeholders resolved
- Throws:
IllegalArgumentException
- when a variable name could not be resolve.d
-
resolve
Replace variable placeholders in values of a map with syntax ${key} with values from the map itself. The variables can recursively reference each other.- Parameters:
config
- Config map with values with variable placeholdersdeescapeVariables
- De-escape variables- Returns:
- Config map with values with variable placeholders resolved
- Throws:
IllegalArgumentException
- when a variable name could not be resolved.
-
deescape
De-escapes all escaped variables in all string values in the given map.- Parameters:
config
- Config map with values that my contain escaped variable references (starting with \$)- Returns:
- Map with de-escaped variable references.
-