Package com.saperion.ngc.configuration
Class ConfigIniSection
- java.lang.Object
-
- com.saperion.ngc.configuration.ConfigIniSection
-
public class ConfigIniSection extends java.lang.Object
Represents a section in one of saperion's ini-files.
-
-
Constructor Summary
Constructors Constructor Description ConfigIniSection(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new ConfigIniSection with the name and properties of the provided SaUserSetting.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBooleanProperty(java.lang.String propertyName, boolean defaultVal)
Returns the boolean value of the specified property.java.lang.String
getName()
java.lang.String
getProperty(java.lang.String propertyName)
Returns the property with the specified name.boolean
hasProperty(java.lang.String propertyName)
java.lang.String
toString()
-
-
-
Constructor Detail
-
ConfigIniSection
public ConfigIniSection(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
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 Detail
-
getProperty
public java.lang.String getProperty(java.lang.String propertyName)
Returns the property with the specified name.- Parameters:
propertyName
- name of the property (not case sensitive)- Returns:
- value or null if not found
-
getBooleanProperty
public boolean getBooleanProperty(java.lang.String propertyName, boolean defaultVal)
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
public java.lang.String getName()
- Returns:
- the name of the section in the ini file that is represented by this ConfigIniSection
-
hasProperty
public boolean hasProperty(java.lang.String propertyName)
- Parameters:
propertyName
- name of the property to check (not case sensitive)- Returns:
- true if the section contains the specified property
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-