Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Optional<EnvironmentService> |
ABSENT |
Constructor and Description |
---|
EnvUtils() |
Modifier and Type | Method and Description |
---|---|
static long |
getBytes(EnvironmentService env,
String key,
long provided)
If the environment contains a string under this key, convert it into a long signifying bytes
|
static org.springframework.core.env.Environment |
getDefaultEnvironment()
Return an environment that uses system properties / environment variables
|
static String |
getEnvironmentVariableKey(String key)
foo.bar -> env.FOO_BAR
foo.barBaz -> env.FOO_BAR_BAZ
|
static String |
toUnderscore(String key)
foo.bar -> foo_bar
foo.barBaz -> foo_bar_baz
|
public static final com.google.common.base.Optional<EnvironmentService> ABSENT
public EnvUtils()
public static long getBytes(EnvironmentService env, String key, long provided)
file.size=10m (file that is 10 megabytes) disk.size=100g (disk that is 100 gigabytes)
public static org.springframework.core.env.Environment getDefaultEnvironment()
public static String getEnvironmentVariableKey(String key)
foo.bar -> env.FOO_BAR foo.barBaz -> env.FOO_BAR_BAZ
public static String toUnderscore(String key)
foo.bar -> foo_bar foo.barBaz -> foo_bar_baz
Copyright © 2010–2014 The Kuali Foundation. All rights reserved.