@API(status=STABLE)
public class BdkConfigLoader
extends java.lang.Object
Constructor and Description |
---|
BdkConfigLoader() |
Modifier and Type | Method and Description |
---|---|
static BdkConfig |
loadFromClasspath(java.lang.String configPath)
Load
BdkConfig from a classpath |
static BdkConfig |
loadFromFile(java.lang.String configPath)
Load
BdkConfig from a file path |
static BdkConfig |
loadFromInputStream(java.io.InputStream inputStream)
Load
BdkConfig from an InputStream |
static BdkConfig |
loadFromProperties(java.util.Properties properties)
Load
BdkConfig from Properties |
static BdkConfig |
loadFromPropertyMap(java.util.Map<java.lang.String,java.lang.String> properties)
Load
BdkConfig from a Map of properties |
static BdkConfig |
loadFromSymphonyDir(java.lang.String relPath)
Load
BdkConfig from a relative path located in the .symphony directory. |
public static BdkConfig loadFromFile(java.lang.String configPath) throws BdkConfigException
BdkConfig
from a file pathconfigPath
- Path of the config fileBdkConfigException
public static BdkConfig loadFromInputStream(java.io.InputStream inputStream) throws BdkConfigException
BdkConfig
from an InputStreaminputStream
- InputStreamBdkConfigException
public static BdkConfig loadFromSymphonyDir(java.lang.String relPath) throws BdkConfigException
BdkConfig
from a relative path located in the .symphony directory.
Note: The .symphony directory is located under your home directory (System.getProperty("user.home")
).
Convention adopted in order to avoid storing sensitive information (such as usernames, private keys...)
within the code base.
relPath
- Configuration file relative path from the ${user.home}/.symphony directoryBdkConfigException
public static BdkConfig loadFromClasspath(java.lang.String configPath) throws BdkConfigException
BdkConfig
from a classpathconfigPath
- Classpath to config fileBdkConfigException
public static BdkConfig loadFromProperties(java.util.Properties properties) throws java.io.IOException
BdkConfig
from Properties
properties
- Properties
with BDK propertiesjava.io.IOException
public static BdkConfig loadFromPropertyMap(java.util.Map<java.lang.String,java.lang.String> properties) throws java.io.IOException
BdkConfig
from a Map of propertiesproperties
- Property map with BDK propertiesjava.io.IOException