public class ConfigUtils
extends java.lang.Object
Constructor and Description |
---|
ConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
getAbsoluteFile(java.lang.String path,
ConfigurationService cfg)
Gets an absolute path in the form of File from an absolute or
relative path specified in the form of a String.
|
static boolean |
getBoolean(ConfigurationService cfg,
java.lang.String property,
boolean defaultValue)
Gets the value as a
boolean of a property from either a specific
ConfigurationService or System . |
static int |
getInt(ConfigurationService cfg,
java.lang.String property,
int defaultValue)
Gets the value as an
int of a property from either a specific
ConfigurationService or System . |
static long |
getLong(ConfigurationService cfg,
java.lang.String property,
long defaultValue)
Gets the value as an
long of a property from either a specific
ConfigurationService or System . |
static java.lang.String |
getString(ConfigurationService cfg,
java.lang.String property,
java.lang.String defaultValue)
Gets the value as a
String of a property from either a specific
ConfigurationService or System . |
static java.lang.String |
getString(ConfigurationService cfg,
java.lang.String property,
java.lang.String propertyAlternative,
java.lang.String defaultValue)
Gets the value as a
String of a property from either a specific
ConfigurationService or System . |
public static java.io.File getAbsoluteFile(java.lang.String path, ConfigurationService cfg)
path
- the absolute or relative path in the form of String
for/from which an absolute path in the form of File is to be
returnedcfg
- the ConfigurationService to be employed by the method
(invocation) if necessarypublic static boolean getBoolean(ConfigurationService cfg, java.lang.String property, boolean defaultValue)
boolean
of a property from either a specific
ConfigurationService
or System
.cfg
- the ConfigurationService
to get the value from or
null
if the property is to be retrieved from System
property
- the name of the property to getdefaultValue
- the value to be returned if property
is not
associated with a valueboolean
of property
retrieved from
either cfg
or System
public static int getInt(ConfigurationService cfg, java.lang.String property, int defaultValue)
int
of a property from either a specific
ConfigurationService
or System
.cfg
- the ConfigurationService
to get the value from or
null
if the property is to be retrieved from System
property
- the name of the property to getdefaultValue
- the value to be returned if property
is not
associated with a valueint
of property
retrieved from
either cfg
or System
public static long getLong(ConfigurationService cfg, java.lang.String property, long defaultValue)
long
of a property from either a specific
ConfigurationService
or System
.cfg
- the ConfigurationService
to get the value from or
null
if the property is to be retrieved from System
property
- the name of the property to getdefaultValue
- the value to be returned if property
is not
associated with a valuelong
of property
retrieved from
either cfg
or System
public static java.lang.String getString(ConfigurationService cfg, java.lang.String property, java.lang.String defaultValue)
String
of a property from either a specific
ConfigurationService
or System
.cfg
- the ConfigurationService
to get the value from or
null
if the property is to be retrieved from System
property
- the name of the property to getdefaultValue
- the value to be returned if property
is not
associated with a valueString
of property
retrieved from
either cfg
or System
public static java.lang.String getString(ConfigurationService cfg, java.lang.String property, java.lang.String propertyAlternative, java.lang.String defaultValue)
String
of a property from either a specific
ConfigurationService
or System
.cfg
- the ConfigurationService
to get the value from or
null
if the property is to be retrieved from System
property
- the name of the property to getpropertyAlternative
- an alternative name of the propertydefaultValue
- the value to be returned if property
is not
associated with a valueString
of property
retrieved from
either cfg
or System
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.