|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.authz.common.config.IniConfigUtil
public class IniConfigUtil
Utilities for getting values for configuration files.
Field Summary | |
---|---|
static java.lang.String |
STRING_LIST_SEPARATOR
Separator for the strings list elements |
Constructor Summary | |
---|---|
IniConfigUtil()
|
Method Summary | |
---|---|
static boolean |
getBoolean(org.ini4j.Profile.Section configSection,
java.lang.String propName)
Extracts a boolean value from a configuration property. |
static boolean |
getBoolean(org.ini4j.Profile.Section configSection,
java.lang.String propName,
boolean defaultValue)
Extracts a boolean value from a configuration property. |
static int |
getInt(org.ini4j.Profile.Section configSection,
java.lang.String propName,
int minValue,
int maxValue)
Extracts an integer value from a configuration property. |
static int |
getInt(org.ini4j.Profile.Section configSection,
java.lang.String propName,
int defaultValue,
int minValue,
int maxValue)
Extracts an integer value from a configuration property. |
static java.lang.String |
getString(org.ini4j.Profile.Section configSection,
java.lang.String propName)
Extracts a string value from a configuration property. |
static java.lang.String |
getString(org.ini4j.Profile.Section configSection,
java.lang.String propName,
java.lang.String defaultValue)
Extracts a string value from a configuration property. |
static java.lang.String[] |
getStringsArray(org.ini4j.Profile.Section configSection,
java.lang.String propName)
Extracts a string list values from a configuration property, the values are separated with " " (space). |
static java.lang.String[] |
getStringsArray(org.ini4j.Profile.Section configSection,
java.lang.String propName,
java.lang.String[] defaultValues)
Extracts a string list values from a configuration property, the values are separated with " " (space). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STRING_LIST_SEPARATOR
Constructor Detail |
---|
public IniConfigUtil()
Method Detail |
---|
public static boolean getBoolean(org.ini4j.Profile.Section configSection, java.lang.String propName, boolean defaultValue)
configSection
- configuration section from which to extract the attributepropName
- name of the configuration propertydefaultValue
- default value for the property
public static boolean getBoolean(org.ini4j.Profile.Section configSection, java.lang.String propName) throws ConfigurationException
configSection
- configuration section from which to extract the attributepropName
- name of the configuration property
ConfigurationException
- thrown if given configuration section does not contain a property with the given
namepublic static java.lang.String getString(org.ini4j.Profile.Section configSection, java.lang.String propName, java.lang.String defaultValue)
configSection
- configuration section from which to extract the attributepropName
- name of the configuration propertydefaultValue
- default value for the property
public static java.lang.String getString(org.ini4j.Profile.Section configSection, java.lang.String propName) throws ConfigurationException
configSection
- configuration section from which to extract the attributepropName
- name of the configuration property
ConfigurationException
- thrown if the value does not exist or has a null/empty valuepublic static int getInt(org.ini4j.Profile.Section configSection, java.lang.String propName, int minValue, int maxValue) throws ConfigurationException
configSection
- configuration section from which to extract the attributepropName
- name of the configuration propertyminValue
- minimum value of the propertymaxValue
- maximum value of the property
ConfigurationException
- thrown if there is a problem getting the required integer valuepublic static int getInt(org.ini4j.Profile.Section configSection, java.lang.String propName, int defaultValue, int minValue, int maxValue)
configSection
- configuration section from which to extract the attributepropName
- name of the configuration propertydefaultValue
- default value of the propertyminValue
- minimum value of the propertymaxValue
- maximum value of the property
public static java.lang.String[] getStringsArray(org.ini4j.Profile.Section configSection, java.lang.String propName) throws ConfigurationException
configSection
- configuration section from which to extract the strings listpropName
- name of the configuration property
ConfigurationException
- thrown if the configuration property does not exist.public static java.lang.String[] getStringsArray(org.ini4j.Profile.Section configSection, java.lang.String propName, java.lang.String[] defaultValues)
configSection
- configuration section from which to extract the strings listpropName
- name of the configuration propertydefaultValues
- the default list values to return if the configuration property does not exist.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |