Class ConfigManager

java.lang.Object
com.coachconnect.config.ConfigManager

public class ConfigManager extends Object
Configuration manager for the application. Loads and provides access to application properties.
  • Method Details

    • getInstance

      public static ConfigManager getInstance()
      Gets or creates the singleton instance.
    • init

      public static void init()
      Initialises the configuration manager by loading properties from the configuration file.
    • getProperty

      public static String getProperty(String key)
      Gets a configuration property value.
      Parameters:
      key - The property key.
      Returns:
      The property value, or null if not found.
    • getProperty

      public static String getProperty(String key, String defaultValue)
      Gets a configuration property value with a default.
      Parameters:
      key - The property key.
      defaultValue - The default value to return if the property is not found.
      Returns:
      The property value, or the default value if not found.
    • getIntProperty

      public static int getIntProperty(String key, int defaultValue)
      Gets a configuration property value as an integer.
      Parameters:
      key - The property key.
      defaultValue - The default value to return if the property is not found.
      Returns:
      The property value as an integer, or the default value if not found.
    • getBooleanProperty

      public static boolean getBooleanProperty(String key, boolean defaultValue)
      Gets a configuration property value as a boolean.
      Parameters:
      key - The property key.
      defaultValue - The default value to return if the property is not found.
      Returns:
      The property value as a boolean, or the default value if not found.
    • getPropertyInstance

      public String getPropertyInstance(String key)
      Instance method to get a property value.
    • getPropertyInstance

      public String getPropertyInstance(String key, String defaultValue)
      Instance method to get a property value with default.
    • getIntPropertyInstance

      public int getIntPropertyInstance(String key, int defaultValue)
      Instance method to get an integer property value.
    • getBooleanPropertyInstance

      public boolean getBooleanPropertyInstance(String key, boolean defaultValue)
      Instance method to get a boolean property value.