Class ModulesYamlConfigLoader
java.lang.Object
cz.metacentrum.perun.core.impl.modules.ModulesYamlConfigLoader
- All Implemented Interfaces:
ModulesConfigLoader
- Author:
- Vojtech Sassmann invalid input: '<'vojtech.sassmann@gmail.com>
-
Constructor Summary
-
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.
-
Constructor Details
-
ModulesYamlConfigLoader
public ModulesYamlConfigLoader() -
ModulesYamlConfigLoader
-
-
Method Details
-
loadInteger
Description copied from interface:ModulesConfigLoader
For module with the given name, find an Integer configuration property with given name.- Specified by:
loadInteger
in interfaceModulesConfigLoader
- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found Integer property for given module
-
loadIntegerList
Description copied from interface:ModulesConfigLoader
For module with the given name, find a list of Integers configuration property with given name.- Specified by:
loadIntegerList
in interfaceModulesConfigLoader
- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found list of Integers property for given module
-
loadIntegerListOrDefault
public List<Integer> loadIntegerListOrDefault(String moduleName, String property, List<Integer> defaultValue) Description copied from interface:ModulesConfigLoader
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.- Specified by:
loadIntegerListOrDefault
in interfaceModulesConfigLoader
- 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
-
loadIntegerOrDefault
Description copied from interface:ModulesConfigLoader
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.- Specified by:
loadIntegerOrDefault
in interfaceModulesConfigLoader
- 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
-
loadString
Description copied from interface:ModulesConfigLoader
For module with the given name, find a String configuration property with given name.- Specified by:
loadString
in interfaceModulesConfigLoader
- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found String property for given module
-
loadStringList
Description copied from interface:ModulesConfigLoader
For module with the given name, find a list of Strings configuration property with given name.- Specified by:
loadStringList
in interfaceModulesConfigLoader
- Parameters:
moduleName
- name of a moduleproperty
- name of a property- Returns:
- found list of Strings property for given module
-
loadStringListOrDefault
public List<String> loadStringListOrDefault(String moduleName, String property, List<String> defaultValue) Description copied from interface:ModulesConfigLoader
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.- Specified by:
loadStringListOrDefault
in interfaceModulesConfigLoader
- 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
-
loadStringOrDefault
Description copied from interface:ModulesConfigLoader
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.- Specified by:
loadStringOrDefault
in interfaceModulesConfigLoader
- 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
-
moduleFileExists
Description copied from interface:ModulesConfigLoader
Checks if configuration file for given module exists.- Specified by:
moduleFileExists
in interfaceModulesConfigLoader
- Parameters:
moduleName
- name of a module- Returns:
- true if configuration file exists, false otherwise
-