Module org.github.gestalt.core
Package org.github.gestalt.config.loader
Interface ConfigLoaderService
-
- All Known Implementing Classes:
ConfigLoaderRegistry
public interface ConfigLoaderServiceMaintains all config loaders. Provides methods for registering and searching for config loaders
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddLoader(ConfigLoader configLoader)add a config loader.voidaddLoaders(java.util.List<ConfigLoader> configLoaders)Add a list of config loaders.java.util.List<ConfigLoader>getConfigLoaders()get the current config loaders.ConfigLoadergetLoader(java.lang.String format)find the first config loader matching the format.voidsetLoaders(java.util.List<ConfigLoader> configLoaders)Set a list of config loaders.
-
-
-
Method Detail
-
addLoaders
void addLoaders(java.util.List<ConfigLoader> configLoaders)
Add a list of config loaders.- Parameters:
configLoaders- config loaders to add.
-
addLoader
void addLoader(ConfigLoader configLoader)
add a config loader.- Parameters:
configLoader- add a config loader
-
setLoaders
void setLoaders(java.util.List<ConfigLoader> configLoaders)
Set a list of config loaders. Will replace any current config loaders.- Parameters:
configLoaders- list of config loaders
-
getConfigLoaders
java.util.List<ConfigLoader> getConfigLoaders()
get the current config loaders.- Returns:
- current config loaders
-
getLoader
ConfigLoader getLoader(java.lang.String format) throws GestaltConfigurationException
find the first config loader matching the format.- Parameters:
format- format we want to load.- Returns:
- the config loader matching the format.
- Throws:
GestaltConfigurationException- if there are no matching config loaders for the format.
-
-