Package com.saperion.ngc.configuration
Class SaperionIniSettings
java.lang.Object
com.saperion.ngc.configuration.SaperionIniSettings
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
Modifier and TypeMethodDescriptionstatic booleangetBooleanSetting(String section, String entry, boolean defaultValue) Loads a boolean setting from the INI files.static intgetIntSetting(String section, String entry, int defaultValue) Loads an int setting from the INI files.static StringgetSetting(String section, String entry, String defaultValue) Loads a setting from the INI files.
-
Method Details
-
getBooleanSetting
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 sectiondefaultValue- 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
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 sectiondefaultValue- 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
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 sectiondefaultValue- 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
-