public final class DeploymentPropertiesUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
convert(Properties properties)
Convert Properties to a Map with String keys and String values.
|
static String |
format(Map<String,String> properties)
Returns a String representation of deployment properties as a comma separated list of
key=value pairs.
|
static Map<String,String> |
parse(String s)
Parses a String comprised of 0 or more comma-delimited key=value pairs where each key
has the properties format(strings and dots).
|
static List<String> |
parseParams(List<String> params)
Parses a list of command line parameters and returns a list of parameters which doesn't
contain any special quoting either for values or whole parameter.
|
public static Map<String,String> parse(String s)
Logic of parsing key/value pairs from a string is based on few rules and assumptions 1. keys will not have commas or equals. 2. First raw split is done by commas which will need to be fixed later if value is a comma-delimited list.
s - the string to parsepublic static String format(Map<String,String> properties)
properties - the properties to formatpublic static Map<String,String> convert(Properties properties)
properties - the properties objectMap<String,String>Copyright © 2021 Pivotal Software, Inc.. All rights reserved.