Interface ModulesConfigLoader
- All Known Implementing Classes:
ModulesYamlConfigLoader
public interface ModulesConfigLoader
- Author:
- Vojtech Sassmann invalid input: '<'vojtech.sassmann@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionloadInteger
(String moduleName, String property) For module with the given name, find an Integer configuration property with given name.loadIntegerList
(String moduleName, String property) For module with the given name, find a list of Integers configuration property with given name.loadIntegerListOrDefault
(String moduleName, String property, List<Integer> defaultValue) For module with the given name, find a list of Integers configuration property with given name.loadIntegerOrDefault
(String moduleName, String property, Integer defaultValue) For module with the given name, find an Integer configuration property with given name.loadString
(String moduleName, String property) For module with the given name, find a String configuration property with given name.loadStringList
(String moduleName, String property) For module with the given name, find a list of Strings configuration property with given name.loadStringListOrDefault
(String moduleName, String property, List<String> defaultValue) For module with the given name, find a list of Strings configuration property with given name.loadStringOrDefault
(String moduleName, String property, String defaultValue) For module with the given name, find a String configuration property with given name.boolean
moduleFileExists
(String moduleName) Checks if configuration file for given module exists.
-
Method Details
-
loadInteger
For module with the given name, find an Integer configuration property with given name.- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found Integer property for given module
- Throws:
ModulePropertyNotFoundException
- when the specified property value is null or is not found or the specified module configuration is not found
-
loadIntegerList
For module with the given name, find a list of Integers configuration property with given name.- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found list of Integers property for given module
- Throws:
ModulePropertyNotFoundException
- when the specified property value is null or is not found or the specified module configuration is not found
-
loadIntegerListOrDefault
List<Integer> loadIntegerListOrDefault(String moduleName, String property, List<Integer> defaultValue) For module with the given name, find a list of Integers configuration property with given name. If the module configuration does not contain the specified property, return the default value.- Parameters:
moduleName
- name of a moduleproperty
- name of a propertydefaultValue
- default value- Returns:
- found list of Integers property for given module, or default value if not found
- Throws:
ModulePropertyNotFoundException
- when the specified property value is null or is not found or the specified module configuration is not found
-
loadIntegerOrDefault
For module with the given name, find an Integer configuration property with given name. If the module configuration does not contain the specified property, return the default value.- Parameters:
moduleName
- name of a moduleproperty
- name of a propertydefaultValue
- default value- Returns:
- found Integer property for given module, or default value if not found
- Throws:
ModulePropertyNotFoundException
- when the specified module configuration is not found
-
loadString
For module with the given name, find a String configuration property with given name.- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found String property for given module
- Throws:
ModulePropertyNotFoundException
- when the specified property value is null or is not found or the specified module configuration is not found
-
loadStringList
For module with the given name, find a list of Strings configuration property with given name.- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found list of Strings property for given module
- Throws:
ModulePropertyNotFoundException
- when the specified property value is null or is not found or the specified module configuration is not found
-
loadStringListOrDefault
For module with the given name, find a list of Strings configuration property with given name. If the module configuration does not contain the specified property, return the default value.- Parameters:
moduleName
- name of a moduleproperty
- name of a propertydefaultValue
- default value- Returns:
- found list of Strings property for given module, or default value if not found
- Throws:
ModulePropertyNotFoundException
- when the specified module configuration is not found
-
loadStringOrDefault
For module with the given name, find a String configuration property with given name. If the module configuration does not contain the specified property, return the default value.- Parameters:
moduleName
- name of a moduleproperty
- name of a propertydefaultValue
- default value- Returns:
- found String property for given module, or default value if not found
- Throws:
ModulePropertyNotFoundException
- when the specified module configuration is not found
-
moduleFileExists
Checks if configuration file for given module exists.- Parameters:
moduleName
- name of a module- Returns:
- true if configuration file exists, false otherwise
-