Package com.symphony.bdk.core.config
Class BdkConfigLoader
java.lang.Object
com.symphony.bdk.core.config.BdkConfigLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BdkConfigloadFromClasspath(String configPath) LoadBdkConfigfrom a classpathstatic BdkConfigloadFromFile(String configPath) LoadBdkConfigfrom a file pathstatic BdkConfigloadFromInputStream(InputStream inputStream) LoadBdkConfigfrom an InputStreamstatic BdkConfigloadFromProperties(Properties properties) LoadBdkConfigfromPropertiesstatic BdkConfigloadFromPropertyMap(Map<String, String> properties) LoadBdkConfigfrom a Map of propertiesstatic BdkConfigloadFromSymphonyDir(String relPath) LoadBdkConfigfrom a relative path located in the .symphony directory.
-
Constructor Details
-
BdkConfigLoader
public BdkConfigLoader()
-
-
Method Details
-
loadFromFile
LoadBdkConfigfrom a file path- Parameters:
configPath- Path of the config file- Returns:
- Symphony Bot Configuration
- Throws:
BdkConfigException
-
loadFromInputStream
LoadBdkConfigfrom an InputStream- Parameters:
inputStream- InputStream- Returns:
- Symphony Bot Configuration
- Throws:
BdkConfigException
-
loadFromSymphonyDir
LoadBdkConfigfrom 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.- Parameters:
relPath- Configuration file relative path from the ${user.home}/.symphony directory- Returns:
- Symphony Bot Configuration
- Throws:
BdkConfigException
-
loadFromClasspath
LoadBdkConfigfrom a classpath- Parameters:
configPath- Classpath to config file- Returns:
- Symphony Bot Configuration
- Throws:
BdkConfigException
-
loadFromProperties
LoadBdkConfigfromProperties- Parameters:
properties-Propertieswith BDK properties- Returns:
- Symphony Bot Configuration
- Throws:
IOException
-
loadFromPropertyMap
LoadBdkConfigfrom a Map of properties- Parameters:
properties- Property map with BDK properties- Returns:
- Symphony Bot Configuration
- Throws:
IOException
-