public class CliConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
EMPTY_STRING_LIST |
| Constructor and Description |
|---|
CliConfig(List<String> domains,
String srvName,
List<URI> masterEndpoints) |
| Modifier and Type | Method and Description |
|---|---|
static CliConfig |
fromConfig(com.typesafe.config.Config config) |
static CliConfig |
fromEnvVar(com.typesafe.config.Config config,
Map<String,String> environmentVariables) |
static CliConfig |
fromFile(File defaultsFile,
Map<String,String> environmentVariables)
Returns a CliConfig instance with values parsed from the specified file.
|
static CliConfig |
fromUserConfig(Map<String,String> environmentVariables)
Returns a CliConfig instance with values from a config file from under the users home
directory:
<user.home>/.helios/config
If the file is not found, a CliConfig with pre-defined values will be returned.
|
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(Map<String,String> environmentVariables) 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, Map<String,String> environmentVariables) 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(com.typesafe.config.Config config, Map<String,String> environmentVariables) throws URISyntaxException
URISyntaxExceptionpublic static CliConfig fromConfig(com.typesafe.config.Config config)
Copyright © 2016. All rights reserved.