Class SaperionIniSettings


  • public final class SaperionIniSettings
    extends java.lang.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 Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean getBooleanSetting​(java.lang.String section, java.lang.String entry, boolean defaultValue)
      Loads a boolean setting from the INI files.
      static int getIntSetting​(java.lang.String section, java.lang.String entry, int defaultValue)
      Loads an int setting from the INI files.
      static java.lang.String getSetting​(java.lang.String section, java.lang.String entry, java.lang.String defaultValue)
      Loads a setting from the INI files.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBooleanSetting

        public static boolean getBooleanSetting​(java.lang.String section,
                                                java.lang.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​(java.lang.String section,
                                        java.lang.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 java.lang.String getSetting​(java.lang.String section,
                                                  java.lang.String entry,
                                                  java.lang.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