public class ConfigurationUtilities extends java.lang.Object
Constructor and Description |
---|
ConfigurationUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
copyAllProperties(java.lang.String namespaceStr,
java.lang.String destModuleName,
java.lang.String srcModuleName)
Copy all the properties in a namespace from one module to another.
|
static void |
copyProperties(java.lang.String destModuleName,
java.lang.String srcModuleName,
java.lang.String destPropertyName,
java.lang.String srcPropertyNames)
Copy a property or set of properties from one module to another using the default namespace.
|
static void |
copyProperties(java.lang.String namespaceStr,
java.lang.String destModuleName,
java.lang.String srcModuleName,
java.lang.String destPropertyName,
java.lang.String srcPropertyNames,
boolean setDirty)
Copy a property or set of properties from one module to another for a specific namespace.
|
static void |
copyPropertiesToIndices(java.lang.String namespaceStr,
java.lang.String destModuleName,
java.lang.String srcModuleName,
java.lang.String destPropertyName,
java.lang.String srcPropertyNames,
java.util.ArrayList<java.lang.Integer> indices)
Copy a property or set of properties from one module to specific top level indices of another
for a specific namespace.
|
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getMultiValuePairsMap(ConfigurationProperty property)
Get a map of name value pairs in the property where each key can have multiple values.
|
static java.util.Map<java.lang.String,java.lang.String> |
getPairsMap(ConfigurationProperty property)
Return a map from a list of name value pairs contained in a property.
|
static java.util.Map<java.lang.String,java.lang.String> |
getPairsMap(ConfigurationProperty property,
boolean recurse)
Return a map of name value pairs contained in a property.
|
public ConfigurationUtilities()
public static java.util.Map<java.lang.String,java.lang.String> getPairsMap(ConfigurationProperty property)
public static java.util.Map<java.lang.String,java.lang.String> getPairsMap(ConfigurationProperty property, boolean recurse)
property
- the propertyrecurse
- if true, look at all depths in the property for pairs.
if false, only return pairs from the top level.public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMultiValuePairsMap(ConfigurationProperty property)
public static void copyAllProperties(java.lang.String namespaceStr, java.lang.String destModuleName, java.lang.String srcModuleName)
public static void copyProperties(java.lang.String destModuleName, java.lang.String srcModuleName, java.lang.String destPropertyName, java.lang.String srcPropertyNames)
destModuleName
- name of destination modulesrcModuleName
- name of source moduledestPropertyName
- name of destination propertysrcPropertyName
- name of property or properties in source module to copy. Can use "a.b.c"
format to denote a nested name.public static void copyProperties(java.lang.String namespaceStr, java.lang.String destModuleName, java.lang.String srcModuleName, java.lang.String destPropertyName, java.lang.String srcPropertyNames, boolean setDirty)
namespaceStr
- the namespacedestModuleName
- name of destination modulesrcModuleName
- name of source moduledestPropertyName
- name of destination propertysrcPropertyName
- name of property or properties in source module to copy. Can use "a.b.c"
format to denote a nested name.setDirty
- If true, set the destination property dirty so that it will be saved.public static void copyPropertiesToIndices(java.lang.String namespaceStr, java.lang.String destModuleName, java.lang.String srcModuleName, java.lang.String destPropertyName, java.lang.String srcPropertyNames, java.util.ArrayList<java.lang.Integer> indices) throws java.lang.Exception
namespaceStr
- the namespacedestModuleName
- name of destination modulesrcModuleName
- name of source moduledestPropertyName
- name of destination propertysrcPropertyName
- name of property or properties in source module to copy. Can use "a.b.c"
format to denote a nested name.indices
- top level destination indices where properties will be placedjava.lang.Exception