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 <vojtech.sassmann@gmail.com>
  • Constructor Details

    • ModulesYamlConfigLoader

      public ModulesYamlConfigLoader()
    • ModulesYamlConfigLoader

      public ModulesYamlConfigLoader(String modulesDirPath)
  • Method Details

    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • moduleFileExists

      public boolean moduleFileExists(String moduleName)
      Description copied from interface: ModulesConfigLoader
      Checks if configuration file for given module exists.
      Specified by:
      moduleFileExists in interface ModulesConfigLoader
      Parameters:
      moduleName - name of a module
      Returns:
      true if configuration file exists, false otherwise