Package com.saperion.ngc.configuration
Class ConfigIniSection
java.lang.Object
com.saperion.ngc.configuration.ConfigIniSection
Represents a section in one of saperion's ini-files.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigIniSection
(String name, Map<String, String> properties) Creates a new ConfigIniSection with the name and properties of the provided SaUserSetting. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBooleanProperty
(String propertyName, boolean defaultVal) Returns the boolean value of the specified property.getName()
getProperty
(String propertyName) Returns the property with the specified name.boolean
hasProperty
(String propertyName) toString()
-
Constructor Details
-
ConfigIniSection
Creates a new ConfigIniSection with the name and properties of the provided SaUserSetting.- Parameters:
name
- name of the section without tenant IDproperties
- properties contained in the section
-
-
Method Details
-
getProperty
Returns the property with the specified name.- Parameters:
propertyName
- name of the property (not case sensitive)- Returns:
- value or null if not found
-
getBooleanProperty
Returns the boolean value of the specified property. If not found, the default value will be returned. If the value cannot be parsed as a boolean, the method will return false.- Parameters:
propertyName
- name of the property (not case sensitive)defaultVal
- default value if the property does not exist- Returns:
- boolean value
-
getName
- Returns:
- the name of the section in the ini file that is represented by this ConfigIniSection
-
hasProperty
- Parameters:
propertyName
- name of the property to check (not case sensitive)- Returns:
- true if the section contains the specified property
-
toString
-