public class ConfigValueUtils extends Object
Constructor and Description |
---|
ConfigValueUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
merge(Map<String,Object> map1,
Map<String,Object> map2)
Nested merge of maps where the values from map2 override those from map1.
|
static Map<String,Object> |
mergeConfigValues(Package pkg,
ConfigValues overrideValues)
Merge configuration values from the Package and values passed at runtime.
|
static List |
mergeList(List list1,
List list2)
Merge two lists, the contents of the second list override those in the first.
|
static Map<String,Object> |
mergeOverrideMap(Package pkg,
Map<String,Object> overrideMap)
Merge top level configuration values from the Package and the configuration values
passed in at runtime.
|
public static Map<String,Object> mergeConfigValues(Package pkg, ConfigValues overrideValues)
The values for dependencies of packages are also merged, which higher level packages overriding lower level packages. Only one level of dependent packages are currently supported.
pkg
- The package to be installed or upgraded.overrideValues
- Configuration values pass in at runtime, when installing or
updating.public static Map<String,Object> mergeOverrideMap(Package pkg, Map<String,Object> overrideMap)
pkg
- The package being configuredoverrideMap
- The runtime override valuespublic static void merge(Map<String,Object> map1, Map<String,Object> map2)
map1
- The base map to merge values ontomap2
- The map of values to override those of the first map argument.Copyright © 2019 Pivotal Software, Inc.. All rights reserved.