Class SettingsMap
- java.lang.Object
-
- com.microsoft.semantickernel.settings.SettingsMap
-
public class SettingsMap extends Object
Creates a map of settings to be used in configuration, the settings are loaded from the following sources in the order of precedence (lower number in this list overrides a higher number):- 1. System properties.
- 2. Environment variables.
- 3. Properties file set via CONF_PROPERTIES environment variable.
- 4. Properties file: ./conf.properties (Not used if CONF_PROPERTIES was set).
- 5. Properties file: ~/.sk/conf.properties (Not used if CONF_PROPERTIES was set).
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONF_PROPERTIESstatic StringCONF_PROPERTIES_NAME
-
Constructor Summary
Constructors Constructor Description SettingsMap()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,String>get(List<File> propertyFileLocations)Get settings, looks for settings in the locations plus the additional locations providedstatic Map<String,String>getDefault()Get settings, looks for settings in the default locationsstatic Map<String,String>getWithAdditional(List<File> propertyFileLocations)Get settings, looks for settings in the default locations plus the additional locations provided
-
-
-
Field Detail
-
CONF_PROPERTIES_NAME
public static final String CONF_PROPERTIES_NAME
- See Also:
- Constant Field Values
-
CONF_PROPERTIES
public static final String CONF_PROPERTIES
-
-
Method Detail
-
getDefault
public static Map<String,String> getDefault() throws ConfigurationException
Get settings, looks for settings in the default locations- Returns:
- A map of settings
- Throws:
ConfigurationException
-
get
public static Map<String,String> get(List<File> propertyFileLocations) throws ConfigurationException
Get settings, looks for settings in the locations plus the additional locations provided- Parameters:
propertyFileLocations- additional locations to look for settings- Returns:
- A client instance
- Throws:
ConfigurationException
-
getWithAdditional
public static Map<String,String> getWithAdditional(List<File> propertyFileLocations) throws ConfigurationException
Get settings, looks for settings in the default locations plus the additional locations provided- Parameters:
propertyFileLocations- additional locations to look for settings- Returns:
- A client instance
- Throws:
ConfigurationException
-
-