Class ApplicationConfigurationProvider
- java.lang.Object
-
- app.coronawarn.server.services.distribution.assembly.appconfig.ApplicationConfigurationProvider
-
public class ApplicationConfigurationProvider extends Object
Provides the application configuration needed for the mobile client. Contains all necessary sub-configs, including:- Exposure Configuration
- Risk Score Classification
- App Config, e.g. minimum risk threshold
The application config is fetched from the master-config folder.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMASTER_FILEThe location of the exposure configuration master file.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ApplicationConfigurationreadFile(String path)Fetches an exposure configuration file based on the given path.static ApplicationConfigurationreadMasterFile()Fetches the master configuration as a ApplicationConfiguration instance.
-
-
-
Field Detail
-
MASTER_FILE
public static final String MASTER_FILE
The location of the exposure configuration master file.- See Also:
- Constant Field Values
-
-
Method Detail
-
readMasterFile
public static ApplicationConfiguration readMasterFile() throws UnableToLoadFileException
Fetches the master configuration as a ApplicationConfiguration instance.- Returns:
- the exposure configuration as ApplicationConfiguration
- Throws:
UnableToLoadFileException- when the file/transformation did not succeed
-
readFile
public static ApplicationConfiguration readFile(String path) throws UnableToLoadFileException
Fetches an exposure configuration file based on the given path. The path must be available in the classloader.- Parameters:
path- the path, e.g. folder/my-exposure-configuration.yaml- Returns:
- the ApplicationConfiguration
- Throws:
UnableToLoadFileException- when the file/transformation did not succeed
-
-