Class ModulesYamlConfigLoader

java.lang.Object
cz.metacentrum.perun.core.impl.modules.ModulesYamlConfigLoader
All Implemented Interfaces:
ModulesConfigLoader

public class ModulesYamlConfigLoader extends Object implements ModulesConfigLoader
Author:
Vojtech Sassmann
  • Constructor Details

    • ModulesYamlConfigLoader

      public ModulesYamlConfigLoader()
    • ModulesYamlConfigLoader

      public ModulesYamlConfigLoader(String modulesDirPath)
  • Method Details

    • loadString

      public String loadString(String moduleName, String property)
      Description copied from interface: ModulesConfigLoader
      For module with the given name, find a String configuration property with given name.
      Specified by:
      loadString in interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - name of a property
      Returns:
      found String property for given module
    • loadStringOrDefault

      public String loadStringOrDefault(String moduleName, String property, String defaultValue)
      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 interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - name of a property
      defaultValue - default value
      Returns:
      found String property for given module, or default value if not found
    • loadInteger

      public Integer loadInteger(String moduleName, String property)
      Description copied from interface: ModulesConfigLoader
      For module with the given name, find an Integer configuration property with given name.
      Specified by:
      loadInteger in interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - name of a property
      Returns:
      found Integer property for given module
    • loadIntegerOrDefault

      public Integer loadIntegerOrDefault(String moduleName, String property, Integer defaultValue)
      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 interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - name of a property
      defaultValue - default value
      Returns:
      found Integer property for given module, or default value if not found
    • loadStringList

      public List<String> loadStringList(String moduleName, String property)
      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 interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - 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 interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - name of a property
      defaultValue - default value
      Returns:
      found list of Strings property for given module, or default value if not found
    • loadIntegerList

      public List<Integer> loadIntegerList(String moduleName, String property)
      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 interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - 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 interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      property - name of a property
      defaultValue - default value
      Returns:
      found list of Integers property for given module, or default value if not found