public final class AppPropertiesService extends Object
Modifier and Type | Method and Description |
---|---|
static List<String> |
getKeys(String strPrefix)
Returns a list of keys that match a given prefix.
|
static Properties |
getProperties()
Gets properties
|
static Map<String,String> |
getPropertiesAsMap()
Gets all properties as a Map
|
static String |
getProperty(String strProperty)
Returns the value of a variable defined in the .properties file of the application as a String
|
static String |
getProperty(String strProperty,
String strDefault)
Returns the value of a variable defined in the .properties file of the application as a String
|
static boolean |
getPropertyBoolean(String strProperty,
boolean bDefault)
Returns the value of a variable defined in the .properties file of the application as a boolean
|
static int |
getPropertyInt(String strProperty,
int nDefault)
Returns the value of a variable defined in the .properties file of the application as an int
|
static long |
getPropertyLong(String strProperty,
long lDefault)
Returns the value of a variable defined in the .properties file of the application as an long
|
static void |
init(String strConfPath)
Initializes the service
|
static void |
reload(String strFilename)
Reloads a given properties file
|
static void |
reloadAll()
Reloads all the properties files
|
public static void init(String strConfPath)
strConfPath
- The configuration pathpublic static String getProperty(String strProperty)
strProperty
- The variable namepublic static String getProperty(String strProperty, String strDefault)
strProperty
- The variable namestrDefault
- The default value which is returned if no value is found for the variable in the .properties file.public static int getPropertyInt(String strProperty, int nDefault)
strProperty
- The variable namenDefault
- The default value which is returned if no value is found for the variable in the le downloadFile .properties. .properties file.public static long getPropertyLong(String strProperty, long lDefault)
strProperty
- The variable namelDefault
- The default value which is returned if no value is found for the variable in the le downloadFile .properties. .properties file.public static boolean getPropertyBoolean(String strProperty, boolean bDefault)
strProperty
- The variable namebDefault
- The default value which is returned if no value is found for the variable in the le downloadFile .properties. .properties file.public static void reloadAll()
public static void reload(String strFilename)
strFilename
- The file namepublic static Properties getProperties()
public static Map<String,String> getPropertiesAsMap()
Copyright © 2020 City of Paris. All rights reserved.