Class SaperionIniSettings

java.lang.Object
com.saperion.ngc.configuration.SaperionIniSettings

public final class SaperionIniSettings extends Object
Loads settings from the Saperion INI files. The file that contains the setting requested will be selected automatically by the backend. Both tenant-specific and non-tenant-specific settings are loaded. If a tenant-specific setting exists, it will be used instead of the non-tenant-specific setting. On single-tenant systems, a global setting with no tenant information is loaded. Settings are cached to avoid multiple reads from the ini-files. The cache is user-specific to enable the use of per-user settings in the ini-files.
  • Method Details

    • getBooleanSetting

      public static boolean getBooleanSetting(String section, String entry, boolean defaultValue)
      Loads a boolean setting from the INI files.
      Parameters:
      section - the name of the section that contains the setting (without tenant-ID).
      entry - the name of the entry in the section
      defaultValue - default value returned when the setting does not exist or if the setting could not be read because of an error
      Returns:
      boolean value or default value if the setting does not exist or if the setting could not be read because of an error
    • getIntSetting

      public static int getIntSetting(String section, String entry, int defaultValue)
      Loads an int setting from the INI files.
      Parameters:
      section - the name of the section that contains the setting (without tenant-ID).
      entry - the name of the entry in the section
      defaultValue - default value returned when the setting does not exist or if the setting could not be read because of an error
      Returns:
      boolean value or default value if the setting does not exist or if the setting could not be read because of an error
    • getSetting

      public static String getSetting(String section, String entry, String defaultValue)
      Loads a setting from the INI files.
      Parameters:
      section - the name of the section that contains the setting (without tenant-ID).
      entry - the name of the entry in the section
      defaultValue - default value returned when the setting does not exist or if the setting could not be read because of an error
      Returns:
      value of the setting or default if the setting does not exist