public class CliConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
EMPTY_STRING_LIST |
static com.fasterxml.jackson.core.type.TypeReference<Map<String,Object>> |
OBJECT_TYPE |
| Constructor and Description |
|---|
CliConfig(List<String> domains,
String srvName,
List<URI> masterEndpoints) |
| Modifier and Type | Method and Description |
|---|---|
static CliConfig |
fromEnvVar(Map<String,Object> config) |
static CliConfig |
fromFile(File defaultsFile)
Returns a CliConfig instance with values parsed from the specified file.
|
static CliConfig |
fromMap(Map<String,Object> config)
Returns a CliConfig instance with values parsed from the specified config node.
|
static CliConfig |
fromUserConfig()
Returns a CliConfig instance with values from a config file from under the users home
directory:
|
static String |
getConfigDirName() |
static String |
getConfigFileName() |
List<String> |
getDomains() |
String |
getDomainsString() |
List<URI> |
getMasterEndpoints() |
String |
getSrvName() |
String |
getUsername() |
public String getUsername()
public String getDomainsString()
public String getSrvName()
public static String getConfigDirName()
public static String getConfigFileName()
public static CliConfig fromUserConfig() throws IOException, URISyntaxException
IOException - If the file exists but could not be readURISyntaxException - If a HELIOS_MASTER env var is present and doesn't parse as a URIpublic static CliConfig fromFile(File defaultsFile) throws IOException, URISyntaxException
defaultsFile - The file to parse fromIOException - If the file exists but could not be readURISyntaxException - If a HELIOS_MASTER env var is present and doesn't parse as a URIpublic static CliConfig fromEnvVar(Map<String,Object> config) throws URISyntaxException
URISyntaxExceptionCopyright © 2014. All rights reserved.