public class EnvUtil extends Object
Constructor and Description |
---|
EnvUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addInternalVariables(Properties prop)
Add a number of internal variables to the Kettle Variables at the root.
|
static void |
applyKettleProperties(Map<?,?> kettleProperties) |
static void |
applyKettleProperties(Map<?,?> kettleProperties,
boolean override) |
static Locale |
createLocale(String localeCode)
Returns an available java.util.Locale object for the given localeCode.
|
static TimeZone |
createTimeZone(String timeZoneId) |
static void |
environmentInit()
Adds the kettle properties the the global system properties.
|
static String[] |
getEnvironmentVariablesForRuntimeExec() |
static String[] |
getLocaleList() |
static String |
getSystemProperty(String key) |
static String |
getSystemProperty(String key,
String def)
This method is written especially for weird JVM's like
|
static String |
getSystemPropertyStripQuotes(String key,
String def)
This method is written especially for weird JVM's like IBM's on AIX and OS/400.
|
static String[] |
getTimeZones() |
static Properties |
readProperties(String fileName)
Returns the properties from the users kettle home directory.
|
public static Properties readProperties(String fileName) throws KettleException
fileName
- the relative name of the properties file in the users kettle directory.KettleException
public static void environmentInit() throws KettleException
KettleException
- in case the properties file can't be read.public static void applyKettleProperties(Map<?,?> kettleProperties)
public static void applyKettleProperties(Map<?,?> kettleProperties, boolean override)
public static void addInternalVariables(Properties prop)
variables
- public static final String[] getEnvironmentVariablesForRuntimeExec()
public static final String getSystemPropertyStripQuotes(String key, String def)
key
- The key, the name of the environment variable to returndef
- The default value to return in case the key can't be foundpublic static final String getSystemProperty(String key, String def)
key
- The key, the name of the environment variable to returndef
- The default value to return in case the key can't be foundpublic static final String getSystemProperty(String key)
key
- The key, the name of the environment variable to returnpublic static Locale createLocale(String localeCode)
localeCode
- public static String[] getTimeZones()
public static String[] getLocaleList()